Expand description
Persistent storage primitives for Tuwunel.
The crate wraps RocksDB with typed maps, serialization helpers, and atomic transactions. Database handles expose the configured column families and the engine that owns them.
Re-exportsΒ§
pub use self::keyval::KeyBuf;pub use self::keyval::KeyVal;pub use self::keyval::Slice;pub use self::keyval::serialize_key;pub use self::keyval::serialize_val;
ModulesΒ§
- compact
- Manual compaction controls for database maps.
- cork π
- Write-ahead-log coalescing via a scoped cork guard.
- de π
- Deserialization for the databaseβs compact record codec.
- deserialized π
- Typed decoding adapters for stored database values.
- engine π
- RocksDB engine: database-wide operations and shared resources.
- handle π
- Pinned database values returned by point queries.
- keyval
- Key and value byte aliases plus database codec adapters.
- map π
- maps
- Column family descriptors used by the homeserver database.
- pool π
- ser π
- Serialization for the databaseβs compact record codec.
- stream π
- txn π
- Atomic database writes backed by one RocksDB write batch.
- util π
StructsΒ§
- Cbor
- Wraps a value for CBOR encoding within the database codec.
- Cork
- Scoped guard that coalesces write-ahead-log flushes for its lifetime.
- Database
- An open Tuwunel database and its configured maps.
- Engine
- Handle to the opened RocksDB database and its shared resources.
- Handle
- Pinned view of a value returned by RocksDB.
- Ignore
- Skips one encoded record when deserialized inside a sequence.
- Ignore
All - Skips the current record and every record that follows it.
- Interfix
- Finalizes a tuple prefix immediately after its trailing separator.
- Json
- Wraps a value for JSON encoding within the database codec.
- Map
- Provides typed and raw access to one RocksDB column family.
- Separator
- Emits one record separator explicitly.
- Txn
- Atomic write batch spanning one or more column families from one database.
ConstantsΒ§
- SEP
- Byte separating records in the compact database format.
StaticsΒ§
- RUSTC_
FLAGS - Stores the compiler arguments captured while building this crate.
TraitsΒ§
- Deserialized
- Converts a stored database value into a typed Serde value.
- Get
- Stream extensions for batched map reads.
- Qry
- Stream extensions for batched map reads.
FunctionsΒ§
- _set_
rustc_ πflags - _unset_
rustc_ πflags - deserialize_
from_ slice - Deserializes a value from database record bytes.
- serialize
- Serializes a value into a caller-provided output buffer.
- serialize_
to - Serializes a value into a default-constructed output buffer.
- serialize_
to_ vec - Serializes a value into an owned byte vector.