Expand description
§Prolly Trees
A Rust implementation of Prolly Trees - content-addressable ordered search indexes that combine the efficiency of B+ trees with deterministic merging capabilities.
§Features
- Ordered key-value storage: Keys are sorted lexicographically (byte comparison)
- Content-addressable nodes: Each node has a unique CID (Content Identifier) derived from its content
- Deterministic structure: Same content always produces the same tree structure
- Efficient diff/merge: Compare trees by comparing root hashes, skip identical subtrees
- Pluggable storage: Implement the
Storetrait for custom backends
§Quick Start
use prolly::{Prolly, MemStore, Config};
// Create a store and tree manager
let store = MemStore::new();
let prolly = Prolly::new(store, Config::default());
// Create an empty tree
let tree = prolly.create();
// Insert key-value pairs (returns a new tree - immutable)
let tree = prolly.put(&tree, b"name".to_vec(), b"Alice".to_vec()).unwrap();
let tree = prolly.put(&tree, b"age".to_vec(), b"30".to_vec()).unwrap();
// Retrieve values
let name = prolly.get(&tree, b"name").unwrap();
assert_eq!(name, Some(b"Alice".to_vec()));
// Delete keys
let tree = prolly.delete(&tree, b"age").unwrap();
assert!(prolly.get(&tree, b"age").unwrap().is_none());§Range Iteration
use prolly::{Prolly, MemStore, Config};
let store = MemStore::new();
let prolly = Prolly::new(store, Config::default());
let mut tree = prolly.create();
// Insert some data
tree = prolly.put(&tree, b"a".to_vec(), b"1".to_vec()).unwrap();
tree = prolly.put(&tree, b"b".to_vec(), b"2".to_vec()).unwrap();
tree = prolly.put(&tree, b"c".to_vec(), b"3".to_vec()).unwrap();
// Iterate over all keys
for result in prolly.range(&tree, &[], None).unwrap() {
let (key, val) = result.unwrap();
println!("{:?} -> {:?}", String::from_utf8_lossy(&key), String::from_utf8_lossy(&val));
}
// Iterate over a specific range [b, c)
for result in prolly.range(&tree, b"b", Some(b"c")).unwrap() {
let (key, val) = result.unwrap();
// Only yields "b" -> "2"
}§Diff and Merge
use prolly::{Prolly, MemStore, Config, Diff};
let store = MemStore::new();
let prolly = Prolly::new(store, Config::default());
// Create base tree
let base = prolly.create();
let base = prolly.put(&base, b"a".to_vec(), b"1".to_vec()).unwrap();
// Create two divergent branches
let left = prolly.put(&base, b"b".to_vec(), b"2".to_vec()).unwrap();
let right = prolly.put(&base, b"c".to_vec(), b"3".to_vec()).unwrap();
// Compute diff
let diffs = prolly.diff(&base, &left).unwrap();
// diffs contains: Added { key: b"b", val: b"2" }
// Three-way merge (no conflicts since changes are disjoint)
let merged = prolly.merge(&base, &left, &right, None).unwrap();
// Merged tree has all keys: a, b, c
assert!(prolly.get(&merged, b"a").unwrap().is_some());
assert!(prolly.get(&merged, b"b").unwrap().is_some());
assert!(prolly.get(&merged, b"c").unwrap().is_some());§Batch Building
For bulk loading data, use BatchBuilder for parallel tree construction:
use prolly::{BatchBuilder, MemStore, Config, Prolly};
use std::sync::Arc;
let store = Arc::new(MemStore::new());
let config = Config::default();
// Build tree from many entries in parallel
let mut builder = BatchBuilder::new(store.clone(), config.clone());
for i in 0..1000 {
builder.add(format!("key{:04}", i).into_bytes(), format!("val{}", i).into_bytes());
}
let tree = builder.build().unwrap();
// Use the tree with Prolly
let prolly = Prolly::new(store, config);
let val = prolly.get(&tree, b"key0042").unwrap();
assert!(val.is_some());§Named Roots
Use named-root helpers when an application needs durable names for immutable tree snapshots:
A named root is a mutable pointer, not a live view. put, delete, batch,
and merge return new immutable Tree handles and do not automatically
advance any name. Publish the replacement tree explicitly, preferably with
compare_and_swap_named_root when another writer could update the same
name.
use prolly::{Config, MemStore, Prolly};
use std::sync::Arc;
let store = Arc::new(MemStore::new());
let prolly = Prolly::new(store.clone(), Config::default());
let tree = prolly.create();
let tree = prolly.put(&tree, b"name".to_vec(), b"Trail".to_vec()).unwrap();
let update = prolly
.compare_and_swap_named_root(b"main", None, Some(&tree))
.unwrap();
assert!(update.is_applied());
let loaded = prolly.load_named_root(b"main").unwrap().unwrap();
assert_eq!(prolly.get(&loaded, b"name").unwrap(), Some(b"Trail".to_vec()));§Custom Storage Backend
Implement the Store trait for custom storage:
use prolly::{Store, BatchOp};
struct MyStore {
// Your storage implementation
}
impl Store for MyStore {
type Error = std::io::Error;
fn get(&self, key: &[u8]) -> Result<Option<Vec<u8>>, Self::Error> {
// Implement get
Ok(None)
}
fn put(&self, key: &[u8], value: &[u8]) -> Result<(), Self::Error> {
// Implement put
Ok(())
}
fn delete(&self, key: &[u8]) -> Result<(), Self::Error> {
// Implement delete
Ok(())
}
fn batch(&self, ops: &[BatchOp]) -> Result<(), Self::Error> {
// Implement batch operations
Ok(())
}
}§Configuration
Customize tree behavior with Config:
use prolly::{Config, Encoding};
let config = Config::builder()
.min_chunk_size(4) // Min entries before considering split
.max_chunk_size(1024) // Max entries per node
.chunking_factor(128) // Controls average node size
.hash_seed(42) // Seed for boundary detection
.encoding(Encoding::Raw) // Value encoding type
.node_cache_max_nodes(50_000) // Optional decoded-node cache cap
.node_cache_max_bytes(256 * 1024 * 1024) // Optional serialized-byte cap
.build();§Advanced Extensibility
The library provides extensible traits for advanced use cases:
§Streaming Diff
Use StreamingDiffer for memory-efficient diff operations on large trees:
use prolly::{Prolly, MemStore, Config, Diff};
use std::sync::Arc;
let store = Arc::new(MemStore::new());
let prolly = Prolly::new(store.clone(), Config::default());
let base = prolly.create();
let other = prolly.put(&base, b"key".to_vec(), b"val".to_vec()).unwrap();
// Stream differences lazily (memory-efficient for large trees)
for diff_result in prolly.stream_diff(&base, &other).unwrap() {
match diff_result {
Ok(diff) => println!("{:?}", diff),
Err(e) => eprintln!("Error: {}", e),
}
}§CRDT Merge
Use ConflictFreeMerger for automatic conflict resolution:
use prolly::{CrdtConfig, CrdtResolution, MergeStrategy, DeletePolicy, TimestampedValue};
// Last-Writer-Wins strategy
let lww_config = CrdtConfig::lww();
// Multi-Value strategy (preserves all concurrent values)
let mv_config = CrdtConfig::multi_value();
// Custom merge function
let custom_config = CrdtConfig::custom(|conflict| {
match &conflict.left {
Some(value) => CrdtResolution::value(value.clone()),
None => CrdtResolution::delete(),
}
});§Parallel Processing
Use ParallelRebalancer for multi-threaded batch operations:
use prolly::{ParallelConfig, DefaultParallelRebalancer};
// Configure parallel processing
let config = ParallelConfig {
max_threads: 4, // Use 4 threads (0 = auto)
parallelism_threshold: 50, // Parallelize when > 50 items
};
let rebalancer = DefaultParallelRebalancer::new();Modules§
Structs§
- Active
Index Control - Active
Index Health - Bounded startup-health details for one active index generation.
- Authenticated
Proof Bundle Verification - Verification result for serialized authenticated proof envelope bytes.
- Authenticated
Proof Envelope - HMAC-authenticated envelope for any proof bundle.
- Authenticated
Proof Envelope Verification - Verification result for an
AuthenticatedProofEnvelope. - Batch
Apply Result - Result of applying a batch with execution stats.
- Batch
Apply Stats - Store-neutral execution stats for a batch mutation.
- Batch
Builder - Batch builder for parallel tree construction.
- Batch
Writer - Batch writer with configurable settings.
- Batch
Writer Config - Configuration for batch write operations.
- Blob
GcPlan - Dry-run garbage-collection plan for offloaded blobs.
- Blob
GcReachability - Live blob set discovered from one or more retained tree roots.
- Blob
GcSweep - Result of sweeping a blob garbage-collection plan.
- BlobRef
- Content-addressed reference to an offloaded blob.
- Boundary
Detector - Resettable boundary state for one ordered tree level.
- Build
Parallelism - Runtime-only worker limit for independent construction work.
- Bytes
KeyCodec - Identity codec for byte-vector keys.
- Canonical
Splice Stats - Observable logical and physical work performed by
canonical_splice. - Canonical
Write Stats - Store-neutral work performed by a canonical write.
- Cbor
Codec - CBOR codec for serde-backed application values.
- Changed
Span - Half-open key range that was recently changed.
- Changed
Span Hint - Recently changed key spans for a specific root transition.
- Chunking
Spec - Persisted content-defined chunking configuration.
- Cid
- Content identifier - a 32-byte SHA-256 hash
- Config
- Tree configuration
- Config
Builder - Builder for Config
- Conflict
- Merge conflict information
- Content
GcPlan - Global typed-content GC plan over an explicit candidate set.
- Content
GcSweep - Applied typed-content GC result.
- Content
Graph Copy - Descendant-first replication result.
- Content
Graph Limits - Hard limits for untrusted typed graph traversal.
- Content
Graph Walk - Deterministic descendant-first traversal report.
- Content
Root Manifest - Immutable typed-root publication payload.
- Content
Root Publication - Crdt
Config - Configuration for conflict-free merging.
- Cursor
- A cursor pointing to a specific position in a prolly tree.
- Cursor
Iterator - Iterator wrapper for cursor-based traversal.
- Cursor
Window - Bounded result for a stateless cursor seek.
- Decoded
Physical Index Key - Default
Conflict Free Merger - Default conflict-free merger implementation.
- Default
Parallel Rebalancer - Default implementation of ParallelRebalancer using rayon.
- Default
Streaming Differ - Default streaming differ using dual cursor traversal.
- Diff
Cursor - Streaming diff iterator using dual cursor traversal.
- Diff
Page - A bounded page of diff results.
- Diff
Page Proof - Proof for a resumable diff page.
- Diff
Page Proof Verification - Store-independent verification result for a
DiffPageProof. - Diff
Traversal Stats - Counters collected while traversing two trees for diff.
- File
Blob Store - Durable filesystem-backed blob store.
- File
Node Store - Durable filesystem node store using content-addressed object layout.
- GcPlan
- Dry-run garbage-collection plan for an explicit candidate set.
- GcReachability
- Live node set discovered from one or more retained tree roots.
- GcSweep
- Result of sweeping a garbage-collection plan.
- Hierarchy
Config - Deterministic hierarchy promotion configuration.
- Hnsw
Build Stats - Logical work reported by a deterministic graph build.
- Hnsw
Config - Deterministic HNSW shape and serving limits.
- Hnsw
Index - Persisted HNSW serving graph bound to one proximity descriptor CID.
- Index
Build Result - Outcome of one idempotent dynamic index registration attempt.
- Index
Checkpoint - Exact hidden-index version selected for one source version.
- Index
Control - Small deterministic root that fences all raw source-map mutations.
- Index
Verification - Full semantic comparison of one rebuilt index and its selected checkpoint.
- Indexed
Head Record - Canonical current selection of one source version and all active index checkpoints.
- Indexed
Map - Strict coordinator for one source map and its active secondary indexes.
- Indexed
MapEditor - Last-write-wins mutation collector for
IndexedMap::edit. - Indexed
MapHealth - Structurally validated current state of an
IndexedMap. - Indexed
MapMetrics Snapshot - Cumulative logical work counters for one
IndexedMaphandle. - Indexed
Retention Result - Deterministic root-name pruning result for one indexed source namespace.
- Indexed
Snapshot - Immutable catalog-selected source and index view.
- Indexed
Snapshot Bundle - Self-contained, canonical transport for one current coordinated snapshot.
- Indexed
Snapshot Bundle Index - One descriptor/checkpoint/tree selection carried by an indexed bundle.
- Indexed
Snapshot Bundle Summary - Compact validated metadata for an indexed snapshot bundle.
- Indexed
Snapshot Bundle Verification - Complete reachability result for a verified indexed snapshot bundle.
- Indexed
Snapshot Id - Reproducible identity of one catalog-selected indexed snapshot.
- Indexed
Version - Complete coordinated publication selected by one catalog version.
- Json
Codec - JSON codec for serde-backed application values.
- KeyBuilder
- Builder for segment-safe composite keys.
- KeyProof
- Root-to-leaf proof for one key.
- KeyProof
Verification - Store-independent verification result for a
KeyProof. - Large
Value Config - Large-value offload policy.
- MapBackup
Version - One version and its self-contained node bundle in a map catalog backup.
- MapCatalog
Verification - Successful integrity audit of one complete managed-map catalog.
- MapChange
Event - One observed managed-map head transition.
- MapChange
Subscription - Resumable in-process change subscription driven by explicit polling.
- MapComparison
- A version-pinned comparison between two snapshots of the same managed map.
- MapMerge
- A three-way merge pinned to a base, current head, and candidate version.
- MapReverse
Iter - Lazy descending iterator backed by bounded reverse pages.
- MapSnapshot
- An immutable, version-pinned view over one managed map snapshot.
- MapVersion
- One durable snapshot in a versioned map.
- MapVersion
Id - Content-derived identifier for one index snapshot.
- MemBlob
Store - In-memory blob store for tests and lightweight applications.
- MemBlob
Store Error - Error type for
MemBlobStore. - MemStore
- In-memory store for testing and simple use cases
- MemStore
Error - Error type for MemStore operations
- Merge
Explanation - Result and trace from
Prolly::merge_explainand its async counterpart when theasync-storefeature is enabled. - Merge
Policy Registry - Domain-level conflict resolver selected by key.
- Merge
Policy Rule - One registered merge policy rule.
- Merge
Trace - Structured diagnostic events for a merge operation.
- Missing
Node Copy - Result of copying missing nodes from one store to another.
- Missing
Node Plan - Dry-run plan for making a destination store able to read one source tree.
- Multi
KeyProof - Shared root proof for multiple keys.
- Multi
KeyProof Verification - Store-independent verification result for a
MultiKeyProof. - Multi
Value Set - A set of concurrent values for MV-Register semantics.
- Mutation
Buffer - Write buffer for batching mutations with size limits.
- Named
Root - A named root loaded through a
crate::Prollymanager. - Named
Root Manifest - A named root manifest returned by manifest-store scans.
- Named
Root Selection - Result of loading roots for a retention policy.
- Neighbor
- One resolved nearest-neighbor result.
- Node
- A node in the Prolly Tree
- Node
Builder - Builder pattern for Node construction
- Overflow
Config - Canonical physical-node paging configuration.
- Owned
Prolly Transaction - A strict optimistic transaction that owns a cloned store handle.
- Owned
Transaction Overlay Store - Owned store overlay used by
OwnedProllyTransaction. - Parallel
Config - Configuration for parallel rebalancing operations.
- Product
Quantization Build Stats - Canonical logical work performed by one PQ build.
- Product
Quantization Config - Deterministic offline product-quantization training and serving policy.
- Product
Quantization Quality - Reconstruction measurements committed into a PQ manifest.
- Product
Quantizer - Source-bound persisted product-quantization sidecar.
- Prolly
- Prolly tree manager
- Prolly
Metrics Snapshot - Cumulative cache and node I/O metrics for a prolly manager.
- Prolly
Transaction - A strict optimistic transaction over a
Prollymanager. - Proof
Authentication - Metadata attached when authenticating a snapshot proof bundle.
- Proof
Bundle Summary - Lightweight metadata decoded from canonical proof bundle bytes.
- Proof
Bundle Verification - Store-independent verification result for opaque canonical proof bundle bytes.
- Proved
Diff Page - A bounded diff page paired with a store-independent proof for that page.
- Proved
Range Page - A bounded range page paired with a store-independent proof for that page.
- Proximity
Build Stats - Canonical logical work reported independently of worker count.
- Proximity
Config - Shape-affecting configuration for a proximity map.
- Proximity
Map - Immutable exact-key directory plus deterministic ANN hierarchy.
- Proximity
Membership Proof - Store-independent exact presence or absence proof bound to one PRXI CID.
- Proximity
Membership Verification - Verified logical outcome of a descriptor-bound membership proof.
- Proximity
Mutation - One immutable-map mutation.
Nonedeletes the key. - Proximity
Mutation Stats - Observable copy-on-write work for one mutation batch.
- Proximity
Record - One logical record supplied to a bulk build.
- Proximity
Search Proof - Self-contained proof for native, PQ, or HNSW search replay.
- Proximity
Search Request - Owned deterministic search request committed by a proof.
- Proximity
Search Stats - Observable resource use for one search.
- Proximity
Search Verification - Verified result and appropriately scoped claim.
- Proximity
Structural Proof - Complete typed PRXI closure sufficient for store-independent verification.
- Proximity
Structural Verification - Authenticated structural summary recomputed from proof objects.
- Proximity
Tree - Persisted handle for the exact directory and derived proximity hierarchy.
- Proximity
Verification - Full structural verification summary.
- Range
Cursor - Stable cursor token for resumable range scans.
- Range
Iter - Iterator over key-value pairs in a range.
- Range
Page - A bounded page of range-scan results.
- Range
Page Proof - Proof for a resumable range page.
- Range
Page Proof Verification - Store-independent verification result for a
RangePageProof. - Range
Proof - Complete proof for all entries in a key range.
- Range
Proof Verification - Store-independent verification result for a
RangeProof. - Reverse
Cursor - Stable cursor token for resumable reverse scans.
- Reverse
Page - A bounded page of reverse-scan results.
- Root
Condition - A named-root value that must still match at transaction commit time.
- Root
Manifest - Durable named-root payload.
- Runtime
Config - Runtime-only tuning that never participates in persisted tree identity.
- Savepoint
- An overlay checkpoint valid until the next successful flush.
- Scalar
Quantization Config - Node-local symmetric signed-int8 routing configuration.
- Search
Budget - Deterministic logical search resource limits.
- Search
Request - One deterministic native proximity search.
- Search
Result - Secondary
Index - One immutable runtime index definition.
- Secondary
Index Builder - Builder for a general projection-aware runtime definition.
- Secondary
Index Cursor - Snapshot- and query-bound cursor for resumable secondary-index scans.
- Secondary
Index Descriptor - Canonical persisted semantic definition for one index generation.
- Secondary
Index Entry - One logical index emission from one source record.
- Secondary
Index Error - Error returned by an application index extractor.
- Secondary
Index Limits - Resource bounds applied before index-derived buffers are published.
- Secondary
Index Match - One decoded physical secondary-index match.
- Secondary
Index Page - One bounded secondary-index query page.
- Secondary
Index Registry - Deterministically ordered runtime definitions supplied when opening an indexed map.
- Secondary
Index Snapshot - Query handle for one exact hidden-index checkpoint.
- Snapshot
Bundle - Self-contained transport bundle for one tree and its reachable node bytes.
- Snapshot
Bundle Node - One content-addressed node included in a portable tree snapshot bundle.
- Snapshot
Bundle Summary - Compact metadata for a validated snapshot bundle.
- Snapshot
Bundle Verification - Result of verifying a snapshot bundle as a self-contained tree.
- Snapshot
Manager - Convenience API for branch, tag, checkpoint, or custom snapshot roots.
- Snapshot
Root - A snapshot root with namespace-local id and manifest metadata.
- Snapshot
Selection - Result of loading several snapshots by namespace-local id.
- Sorted
Batch Builder - Streaming bulk builder for entries that are already sorted by key.
- Stats
Comparison - Combined statistics comparison between two tree snapshots.
- Stats
Diff - Difference between two statistics objects
- Stats
Percentage Change - Percentage change between two statistics objects
- String
KeyCodec - UTF-8 codec for string keys. Ordering follows UTF-8 byte order.
- Structural
Diff Cursor - Stable checkpoint token for structural diff traversal.
- Structural
Diff Page - A bounded page from the structural diff iterator.
- Structural
Patch - Term
Bounds - Timestamped
Value - A value with an embedded timestamp for LWW ordering.
- Tombstone
- Logical deletion value with causal metadata.
- Transaction
Conflict - Details for a failed transaction validation.
- Transaction
Overlay Error - Tree
- A Prolly Tree handle
- Tree
Debug Compared Node - A compared node annotated with its sharing status.
- Tree
Debug Comparison - Structural sharing comparison between two tree roots.
- Tree
Debug Comparison Level - Per-level structural sharing summary.
- Tree
Debug Level - Debug metadata for all nodes at one tree level.
- Tree
Debug Node - Inspectable node metadata for debug tooling.
- Tree
Debug View - Debug view of a tree grouped by level.
- Tree
Format - Persisted settings that determine tree shape and content IDs.
- Tree
Stats - Statistics about a Prolly tree structure
- Typed
Content Object - One authenticated object returned in descendant-first order.
- Typed
Content Root - Typed content-addressed root plus decode context required by PRXN objects.
- Typed
Migration Result - Result of rewriting every typed value through a schema migration.
- Typed
Versioned Map - Typed facade over a byte-oriented
VersionedMap. - Vector
Storage Config - Canonical inline versus external representative-vector policy.
- Version
Prune Result - Result of pruning immutable version roots from a managed map.
- Versioned
Cbor Codec - Versioned CBOR codec with schema/version validation on decode.
- Versioned
Json Codec - Versioned JSON codec with schema/version validation on decode.
- Versioned
Map - Built-in versioned map facade over a
Prollyengine. - Versioned
MapBackup - Portable backup of one complete managed-map catalog.
- Versioned
MapBatch Result - Managed-map publication plus engine batch execution statistics.
- Versioned
MapEditor - Mutation collector used by
VersionedMap::edit. - Versioned
Maps Transaction - One strict transaction spanning any number of managed maps.
- Versioned
Value - Deterministic schema/version envelope for an application value.
- Write
Session - Bounded mutable view over an immutable base tree.
Enums§
- Adaptive
Quality - Deterministic approximate-search quality policy.
- BatchOp
- Batch operation for atomic writes
- Boundary
Input - Entry bytes supplied to the boundary hash.
- Boundary
Rule - Rule used to select a content-defined boundary.
- Chunk
Measure - Quantity used to enforce a chunk’s soft size bounds.
- Content
Manifest Update - Content
Object Kind - Authenticated content codec used for one graph object.
- Crdt
Resolution - Conflict-free custom resolution.
- Delete
Policy - Policy for delete vs update conflicts.
- Diff
- Difference between two trees
- Distance
Metric - Distance function committed into a proximity-map descriptor.
- Encoding
- Encoding type for values
- Error
- Prolly tree errors
- File
Blob Store Error - Error type for
FileBlobStore. - File
Node Store Error - Error type for
FileNodeStore. - Hash
Algorithm - Stable hash algorithms available to persisted chunking policies.
- Index
Projection - Bytes stored beside a matching primary key in the physical index tree.
- Index
Value - Canonical physical value stored in a secondary-index tree.
- Indexed
MapUpdate - Conditional indexed-map write outcome.
- KeyDecode
Error - Error returned by
decode_segments. - Logical
Patch - Manifest
Update - Result of a named-root compare-and-swap update.
- Merge
Fallback Reason - Why merge left a fast path and continued through a broader path.
- Merge
Fast Path - Root-level fast path used by a merge.
- Merge
Policy Rule Label - Human-readable label for a merge policy rule.
- Merge
Resolution Kind - Compact form of a resolver result for trace events.
- Merge
Reuse Reason - Why a subtree CID could be reused by the structural merge path.
- Merge
Strategy - Merge strategy for conflict-free merging.
- Merge
Trace Event - A single event emitted while explaining a merge.
- Merge
Trace Stage - Where in the merge algorithm a trace event occurred.
- Mutation
- A mutation to apply to the tree
- Named
Root Retention - Policy for selecting named roots to retain during garbage collection.
- Named
Root Update - Result of a named-root compare-and-swap through a
crate::Prollymanager. - Node
Layout Spec - Physical encoding used for nodes in a tree.
- Pending
Value - Pending value in a write-session overlay.
- Proof
Bundle Kind - Canonical proof bundle family.
- Proximity
Filter - Canonical structural restriction applied before leaf scoring.
- Proximity
Proof Filter - Owned, replayable form of every public proximity filter.
- Proximity
Search Claim - Scope of the claim established by replay.
- Proximity
Search Event - Deterministic, tamper-evident replay transcript summary.
- Query
Kernel - Runtime-only deterministic query distance implementation.
- Resolution
- Resolution for a standard three-way merge conflict.
- Root
Write - A named-root write staged by a transaction.
- Search
Backend - Search execution backend.
- Search
Completion - Honest completion state for a search result.
- Search
Policy - Logical search termination policy.
- Secondary
Index Direction - Direction captured by a resumable secondary-index cursor.
- Snapshot
Namespace - Namespace used to derive stable named-root keys for snapshots.
- Structural
Diff Marker - Public marker for one suspended structural diff frame.
- Structural
Edit - Transaction
Node Write - A content-addressed node write staged by a transaction.
- Transaction
Update - Result of committing a transaction.
- Tree
Debug Node Status - Whether a compared subtree is shared or unique to one side.
- Value
Ref - Value stored in a leaf by the large-value helper layer.
- Versioned
MapUpdate - Outcome of a compare-and-update operation.
Constants§
- DEFAULT_
CHUNKING_ FACTOR - Default chunking factor: 128 = ~0.78% boundary probability
- DEFAULT_
HASH_ SEED - Default seed for the hash function
- DEFAULT_
INLINE_ VALUE_ THRESHOLD - Default maximum value size stored directly in leaf nodes by large-value helpers.
- DEFAULT_
MAX_ CHUNK_ SIZE - Default maximum number of key-value pairs in a node
- DEFAULT_
MIN_ CHUNK_ SIZE - Default minimum entries before considering chunk boundary
- DEFAULT_
VERSIONED_ MAP_ RETRIES - Maximum optimistic attempts made by the convenience mutation methods.
- INDEXED_
SNAPSHOT_ BUNDLE_ FORMAT_ VERSION - INDEX_
PHYSICAL_ LAYOUT_ VERSION - INIT_
LEVEL - Initial (leaf) level from which the prolly tree is built
- SECONDARY_
INDEX_ FORMAT_ VERSION - SNAPSHOT_
BRANCH_ PREFIX - Root-name prefix used for branch snapshots.
- SNAPSHOT_
BUNDLE_ FORMAT_ VERSION - Current in-memory format version for portable tree snapshot bundles.
- SNAPSHOT_
CHECKPOINT_ PREFIX - Root-name prefix used for checkpoint snapshots.
- SNAPSHOT_
TAG_ PREFIX - Root-name prefix used for immutable release/tag snapshots.
- VERSIONED_
MAP_ ROOT_ PREFIX - Root namespace reserved for built-in versioned maps.
Traits§
- Blob
Store - Content-addressed blob storage used by large-value helpers.
- Blob
Store Scan - Blob stores that can enumerate known blob references.
- Conflict
Free Merger - Trait for conflict-free merge operations using CRDT semantics.
- KeyCodec
- Codec for converting typed application keys to and from ordered map bytes.
- Manifest
Store - Storage for named root manifests.
- Manifest
Store Scan - Manifest stores that can enumerate durable named roots.
- Node
Store Scan - Storage backends that can enumerate content-addressed node CIDs.
- Parallel
Rebalancer - Trait for parallel rebalancing operations.
- Secondary
Index Extractor - Deterministic runtime callback that derives zero or more index emissions.
- Store
- Storage backend trait for Prolly Trees
- Streaming
Differ - Trait for streaming diff operations.
- Transactional
Store - Store support for strict atomic transaction commits.
- Value
Codec - Codec for converting typed application values to and from stored bytes.
Functions§
- append_
batch - Apply mutations optimized for append-only workloads.
- canonical_
splice - Apply logical mutations through the canonical localized writer.
- catalog_
checkpoint_ key - catalog_
checkpoints_ prefix - Prefix containing every source-version checkpoint record.
- catalog_
current_ key - catalog_
descriptor_ key - catalog_
format_ key - catalog_
map_ id - catalog_
retired_ key - compare_
and_ swap_ named_ content_ root - compare_
and_ swap_ named_ content_ root_ with_ limits - content_
references - Load one authenticated object and return its exact, deterministic typed reference list without recursively walking descendants.
- control_
record_ key - control_
root_ name - copy_
and_ publish_ content_ graph - Replicate a closed graph, then publish its immutable typed-root manifest by name.
- copy_
content_ graph - debug_
key - Format arbitrary key bytes with printable ASCII and
\xNNescapes. - decode_
cbor - Deserialize typed CBOR value bytes.
- decode_
json - Deserialize typed JSON value bytes.
- decode_
physical_ index_ key - decode_
segments - Decode a composite key built from escaped segments.
- descriptor_
fingerprint - Hash the canonical semantic descriptor envelope (excluding its fingerprint field).
- encode_
cbor - Serialize a typed value as compact CBOR bytes.
- encode_
json - Serialize a typed value as compact JSON bytes.
- encode_
segment - Encode one segment for use in a composite key.
- encode_
segment_ prefix - Escape a partial segment without appending its terminator.
- i64_key
- Encode an
i64so lexicographic byte ordering matches numeric ordering. - i128_
key - Encode an
i128so lexicographic byte ordering matches numeric ordering. - index_
map_ id - inspect_
proof_ bundle - Decode lightweight metadata from canonical proof bundle bytes.
- is_
boundary - Check if entry at index creates a chunk boundary in a node.
- is_
boundary_ config - Check if entry creates a chunk boundary using Config.
- is_
tombstone_ value - Return true if bytes start with the tombstone magic prefix.
- load_
named_ content_ root - load_
named_ content_ root_ with_ limits - physical_
index_ key - plan_
content_ gc - prefix_
end - Return the smallest exclusive upper bound for all keys with
prefix. - prefix_
range - Return the half-open byte range covering all keys with
prefix. - put_
named_ content_ root - put_
named_ content_ root_ with_ limits - sign_
proof_ bundle_ hmac_ sha256 - Build an HMAC-SHA256 authenticated envelope for canonical proof bundle bytes.
- snapshot_
id_ from_ name - Return the snapshot id if
namebelongs tonamespace. - snapshot_
root_ name - Build the durable named-root key for
idinnamespace. - sweep_
content_ gc - sweep_
content_ gc_ with_ invalidator - Sweep unreachable candidates and invalidate process-local consumers after each successful deletion. Per-object notification keeps caches correct even when a later store deletion fails.
- term_
bounds_ exact - term_
bounds_ prefix - term_
bounds_ range - timestamp_
millis_ key - Encode a Unix timestamp in milliseconds using unsigned lexicographic order.
- tombstone_
compaction - Return a physical delete mutation when
stored_valueis a tombstone. - tombstone_
upsert - Build an upsert mutation that stores
tombstoneatkey. - u64_key
- Encode a
u64so lexicographic byte ordering matches numeric ordering. - u128_
key - Encode a
u128so lexicographic byte ordering matches numeric ordering. - verify_
authenticated_ proof_ bundle - Decode, authenticate, and verify serialized proof envelope bytes.
- verify_
authenticated_ proof_ envelope - Verify an authenticated proof envelope with the shared secret.
- verify_
diff_ page_ proof - Verify a diff-page proof without consulting a store.
- verify_
key_ proof - Verify a key proof without consulting a store.
- verify_
multi_ key_ proof - Verify a shared multi-key proof without consulting a store.
- verify_
proof_ bundle - Decode and verify opaque canonical proof bundle bytes.
- verify_
range_ page_ proof - Verify a resumable range-page proof without consulting a store.
- verify_
range_ proof - Verify a range proof without consulting a store.
- walk_
content_ graph
Type Aliases§
- Custom
Merge Fn - Custom merge function type.
- Exact
Proximity Record - Vector and application value returned by an exact-key lookup.
- Indexed
Source Record - One primary key and full source value resolved from the pinned snapshot.
- KeyValue
- An owned key-value entry returned by ordered tree lookups.
- Merge
Policy Fn - Shared merge policy function used by
MergePolicyRegistry. - Projected
Index Entry - One primary key and its optional projected bytes.
- Resolver
- Conflict resolution strategy
- Timestamp
Extractor - Timestamp extractor function type.