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

Method entries_from

atomic-remote/src/sync.rs:224–233  ·  view source on GitHub ↗

Get all entries at or after a given sequence number.

(&self, from_sequence: u64)

Source from the content-addressed store, hash-verified

222
223 /// Get all entries at or after a given sequence number.
224 pub fn entries_from(&self, from_sequence: u64) -> Vec<(u64, &Node)> {
225 let mut result: Vec<_> = self
226 .entries
227 .iter()
228 .filter(|(&seq, _)| seq >= from_sequence)
229 .map(|(&seq, node)| (seq, node))
230 .collect();
231 result.sort_by_key(|(seq, _)| *seq);
232 result
233 }
234
235 /// Update the cache by replacing entries from the divergence point
236 /// with new entries from the remote.

Callers 3

compute_deltaMethod · 0.80

Calls 1

iterMethod · 0.45