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

Function transactions

crates/commitlog/src/lib.rs:640–650  ·  view source on GitHub ↗

Obtain an iterator which traverses the commitlog located at the `root` directory from the start, yielding [`Transaction`]s. Starts the traversal without the upfront I/O imposed by [`Commitlog::open`]. See [`Commitlog::transactions`] for more information.

(
    root: CommitLogDir,
    de: &'a D,
)

Source from the content-addressed store, hash-verified

638/// Starts the traversal without the upfront I/O imposed by [`Commitlog::open`].
639/// See [`Commitlog::transactions`] for more information.
640pub fn transactions<'a, D, T>(
641 root: CommitLogDir,
642 de: &'a D,
643) -> io::Result<impl Iterator<Item = Result<Transaction<T>, D::Error>> + 'a>
644where
645 D: Decoder<Record = T>,
646 D::Error: From<error::Traversal>,
647 T: 'a,
648{
649 transactions_from(root, 0, de)
650}
651
652/// Obtain an iterator which traverses the commitlog located at the `root`
653/// directory starting from `offset` and yielding [`Transaction`]s.

Callers

nothing calls this directly

Calls 1

transactions_fromFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…