Skip to main content

Module store

Module store 

Source
Expand description

Chunk storage traits and implementations.

Async traits (ChunkGet, ChunkPut, ChunkHas) are the primary API. Sync traits (SyncChunkGet, SyncChunkPut, SyncChunkHas) are helpers for CPU-bound paths (splitter, mantaray). Blanket impls bridge sync → async automatically for types that are Send + Sync.

Structs§

MemoryStore
In-memory chunk storage using a RwLock<HashMap>.
NullLoader
A no-op loader that always returns ChunkStoreError::NotFound.

Enums§

ChunkStoreError
Errors from chunk storage operations.

Traits§

ChunkGet
Async chunk retrieval (primary API).
ChunkHas
Async chunk existence check (primary API).
ChunkPut
Async chunk storage (primary API, &self).
SyncChunkGet
Retrieves chunks by address (synchronous).
SyncChunkHas
Checks chunk existence (synchronous).
SyncChunkPut
Stores chunks (synchronous, &self — implementors use interior mutability).