MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / log

Function log

atomic-repository/src/history/iter.rs:140–150  ·  view source on GitHub ↗

Get forward history log from a view. Returns an iterator over history entries starting from the given sequence number and proceeding forward (oldest to newest). # Arguments `txn` - Read transaction `view` - View to query `options` - Query options # Returns An iterator yielding `HistoryEntry` items. # Example ```rust,ignore let iter = log(&txn, &view, &HistoryOptions::default())?; for entry

(
    txn: &'a T,
    view: &ViewState,
    options: &HistoryOptions,
)

Source from the content-addressed store, hash-verified

138/// }
139/// ```
140pub fn log<'a, T: ViewTxnT>(
141 txn: &'a T,
142 view: &ViewState,
143 options: &HistoryOptions,
144) -> HistoryResult<HistoryIter<'a, T>> {
145 let inner = txn
146 .iter_changes(view, options.from_sequence)
147 .map_err(|e| HistoryError::Database(e.to_string()))?;
148
149 Ok(HistoryIter::new(txn, view.clone(), inner, options))
150}
151
152/// Get reverse history log from a view.
153///

Callers 2

reverse_logFunction · 0.70
logMethod · 0.50

Calls 2

iter_changesMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected