Skip to main content

Crate tuwunel_database

Crate tuwunel_database 

Source
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.
IgnoreAll
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.