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

Method commits_from

crates/commitlog/src/lib.rs:351–356  ·  view source on GitHub ↗

Obtain an iterator starting from transaction offset `offset`, yielding [`StoredCommit`]s. Similar to [`Self::commits`] but will skip until the offset is contained in the next [`StoredCommit`] to yield. Note that the first [`StoredCommit`] yielded is the first commit containing the given transaction offset, i.e. its `min_tx_offset` may be smaller than `offset`.

(
        &self,
        offset: u64,
    )

Source from the content-addressed store, hash-verified

349 /// containing the given transaction offset, i.e. its `min_tx_offset` may be
350 /// smaller than `offset`.
351 pub fn commits_from(
352 &self,
353 offset: u64,
354 ) -> impl Iterator<Item = Result<StoredCommit, error::Traversal>> + use<T, R> {
355 self.inner.read().unwrap().commits_from(offset)
356 }
357
358 /// Get a list of segment offsets, sorted in ascending order.
359 pub fn existing_segment_offsets(&self) -> io::Result<Vec<u64>> {

Callers 1

commitsMethod · 0.45

Calls 2

unwrapMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected