Skip to main content

Module storage

Module storage 

Source
Expand description

Embedded storage APIs, routing helpers, batch payloads, and runtime stats.

Most applications start with EmbeddedStore, which is a shared, sharded key-value database handle. Applications that need cheap clones of one cross-worker handle can use SharedEmbeddedStore. Applications that pin work to owner-local worker threads can use LocalEmbeddedStore for exclusive &mut access to the shards assigned to that worker.

Keys and values are byte vectors (Vec<u8>). TTL arguments accepted by write methods are milliseconds relative to the current time; expiration methods that accept expire_at_ms use an absolute Unix timestamp in milliseconds.

Structs§

BorrowedCommand
Command
EmbeddedBatchReadView
Owned batch read view.
EmbeddedKeyRoute
Precomputed routing metadata for one key.
EmbeddedReadSlice
One stable byte slice captured during a batch read.
EmbeddedReadView
Owned single-value read view.
EmbeddedSessionRoute
Precomputed shard placement for one session prefix.
EmbeddedShardHandle
Exclusive shard-local handle for slot-owned embedded workers.
EmbeddedStore
Shared embedded in-memory database.
EngineHandle
FlatMap
GlobalStatsSnapshot
LocalEmbeddedBatchReadView
Batch read result whose item lifetimes are tied to one worker-local store borrow.
LocalEmbeddedReadSlice
Read metadata for a value returned by a WorkerLocalEmbeddedStore.
LocalEmbeddedReadView
Optional single-key read result from a worker-local store.
LocalEmbeddedSessionPackedView
Owned packed-session view for the owned-worker embedded path.
LocalEmbeddedStore
Worker-owned view of the shards assigned to one local server worker.
LocalEmbeddedStoreBootstrap
Temporary container produced while partitioning an EmbeddedStore across workers.
MutationRecord
OwnedEmbeddedBatchReadView
Owned batch read view for the owned-worker embedded path.
OwnedEmbeddedReadView
Owned single-value read view for the owned-worker embedded path.
OwnedEmbeddedSessionPackedView
Owned packed-session view for the owned-worker embedded path.
OwnedEmbeddedShard
Owned shard for slot-range workers.
OwnedEmbeddedWorkerReadSession
Long-lived worker-local read session for the absolute max embedded read path.
OwnedEmbeddedWorkerShards
One worker-local shard set for the slot-owned embedded path.
PackedBatch
A packed copy-out batch result.
PackedSessionWrite
Packed write buffer for replacing one session’s chunk set.
PreparedPointKey
Precomputed routing and exact-match metadata for repeated point lookups.
ShardStatsSnapshot
SharedEmbeddedConfig
Configuration for SharedEmbeddedStore.
SharedEmbeddedRef
Borrowed value guard returned by SharedEmbeddedStore::get.
SharedEmbeddedRefMut
Mutable point-key guard returned by SharedEmbeddedStore::get_mut.
SharedEmbeddedStore
Cloneable, lock-striped embedded cache handle.
SharedEmbeddedVacantEntry
Vacant routed entry.
StoredEntry
TierStatsSnapshot
WalStatsSnapshot

Enums§

EmbeddedRouteMode
Selects how embedded database traffic is routed across shards.
LocalRouteError
Indicates that a requested key or session routes to another worker’s shards.
LocalStoreAccessError
Error returned when accessing thread-local worker storage.
LocalStoreInstallError
Error returned when installing a worker-local store into thread-local state.
MutationOp
RedisObjectError
RedisObjectResult
RedisStringLookup
SharedEmbeddedEntry
Occupied or vacant routed entry.
SharedEmbeddedLockPolicy
Lock policy for SharedEmbeddedStore stripes.

Functions§

hash_key
Computes the crate’s primary XXH3 key hash.
hash_key_tag
Computes the primary-hash-derived key tag used by prepared point lookups.
hash_key_tag_from_hash
Computes the key tag associated with an already-computed primary key hash.
now_millis
Returns the current Unix timestamp in milliseconds.
shift_for
stripe_index
take_local_embedded_store
with_local_embedded_store

Type Aliases§

Bytes
Owned byte buffer used for cache keys and values.
EmbeddedSessionBatchView
Session-scoped owned batch view.
FastHashMap
Hash map with the crate’s default XXH3 hasher.
FastHashSet
Hash set with the crate’s default XXH3 hasher.
LocalEmbeddedSessionBatchView
Session-key batch view returned by worker-local session APIs.
MutationBytes
OwnedEmbeddedSessionBatchView