Development Documentation (main branch) - For stable release docs, see docs.rs/eidetica
Skip to main content

Module snapshot

Module snapshot 

Source
Expand description

Snapshot — an immutable identifier of a database state at a point in time.

A Snapshot is the canonical (sorted, deduplicated) set of DAG tip IDs that fully identifies the state of a Database or a Store within one. Content-addressing makes the mapping bijective: given a snapshot and the database root it belongs to, the entries (and therefore all reachable content) are uniquely determined.

Use a Snapshot to pin a read view, anchor a transaction, or describe a state transition (e.g. WriteEvent { from, to }).

Snapshot is intentionally scope-free: it carries only a set of tips. The scope — a database root, or a (database root, store name) pair — is contextual and supplied alongside the snapshot at API boundaries. A snapshot can therefore describe either a database state or a store state; the distinction lives in the API method consuming it, not on the snapshot itself. Keeping Snapshot as just a canonical tip-set means no optional fields, no runtime “is the root set?” checks, and a wire format identical to Vec<ID>.

Structs§

Snapshot
Identifier for a database state — a sorted, deduplicated set of DAG tips.