Skip to main content

Crate topodb

Crate topodb 

Source

Structs§

AccessStats
Per-node access statistics: how many times a node has been returned by a scoped read, and the wall-clock millisecond timestamp of the most recent such read. Default (both zero) means “exists but never counted”.
AppliedBatch
The committed result of a successful crate::Db::submit/ crate::Db::submit_at call: the inclusive [first_seq, last_seq] range the batch’s ops were assigned in the durable op log, and the batch’s ops in their fully-resolved form (timestamps filled in) as actually written.
ChangeEvent
A single committed op paired with its op-log sequence number.
Db
A handle to an open database. Cloning shares the same underlying storage and applier thread — Db is Send + Sync + Clone. All writes funnel through a single applier thread (via submit/submit_at), so batches serialize deterministically even under concurrent callers.
EdgeId
EdgeRecord
IndexSpec
Declares which (label, prop) pairs get indexed, and how.
NodeId
NodeRecord
PropIndex
A single declared (label, prop) pair to index.
ScopeId
ScopeSet
The mandatory scope filter for every read. There is no unscoped read.
Snapshot
A persistent (structurally-shared) snapshot of the graph’s nodes and adjacency. apply produces a new Snapshot from an old one plus a batch of resolved ops without a full copy — unaffected subtrees of the underlying im structures are shared between old and new versions.
Subgraph
Result of a traversal: every in-scope seed plus everything reached, deduped, with the full edge records (from the snapshot’s edges map) for every traversed edge.
TraversalQuery
A bounded, scoped, temporal breadth-first traversal request.
VectorQuery
A vector-search request: cosine-rank the embeddings under model within scopes against vector, returning the top k.

Enums§

Direction
Which adjacency to walk from each frontier node.
Op
A fully-resolved mutation. INVARIANT: ops are appended to the log only after the applier resolves every default (timestamps especially) — a stored op never contains “now”. Replay must be deterministic.
PropValue
Scope
TopoError

Type Aliases§

Props