MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / commits

Method commits

crates/commitlog/src/lib.rs:338–340  ·  view source on GitHub ↗

Obtain an iterator which traverses the log from the start, yielding [`StoredCommit`]s. The returned iterator is not aware of segment rotation. That is, if a new segment is created after this method returns, the iterator will not traverse it. Commits appended to the log while it is being traversed are generally visible to the iterator. Upon encountering [`io::ErrorKind::UnexpectedEof`], however,

(&self)

Source from the content-addressed store, hash-verified

336 /// may want to check if the iterator is exhausted (by calling `next()`)
337 /// before treating the `Err` value as an application error.
338 pub fn commits(&self) -> impl Iterator<Item = Result<StoredCommit, error::Traversal>> + use<T, R> {
339 self.commits_from(0)
340 }
341
342 /// Obtain an iterator starting from transaction offset `offset`, yielding
343 /// [`StoredCommit`]s.

Callers 3

reset_to_internalFunction · 0.45
nextMethod · 0.45

Calls 1

commits_fromMethod · 0.45

Tested by 1