Rust API¶
The Rust API is documented with rustdoc and auto-published to docs.rs. The canonical, always-up-to-date reference lives there.
Generating the docs locally¶
The --document-private-items flag is helpful when you want to read the implementation details of things like Node and the balancing predicate.
Where to start¶
If you're new to the crate, these modules are the useful entry points, roughly in layering order:
| Module | What lives there |
|---|---|
prollytree::tree |
ProllyTree, the core data structure |
prollytree::storage |
NodeStorage trait, InMemoryNodeStorage, FileNodeStorage |
prollytree::rocksdb (feature rocksdb_storage) |
RocksDBNodeStorage |
prollytree::git (feature git) |
VersionedKvStore, StoreFactory, GitNodeStorage |
prollytree::sql (feature sql) |
GlueSQL adapter |
prollytree::diff |
Diff types and ConflictResolver trait |
prollytree::proof |
Merkle inclusion/absence proofs |
prollytree::config |
TreeConfig |
Surface at a glance¶
use prollytree::{
tree::{ProllyTree, Tree},
storage::{InMemoryNodeStorage, FileNodeStorage},
config::TreeConfig,
};
#[cfg(feature = "git")]
use prollytree::git::versioned_store::{StoreFactory, VersionedKvStore};
#[cfg(feature = "sql")]
use prollytree::sql::ProllySQLStore;
See Quickstart for the shortest working example and Basic Usage for a longer walk.