Expand description
Chunk storage traits and implementations.
ChunkGet, ChunkPut, and ChunkHas are async and carry MaybeSend/
MaybeSync bounds so a store may be !Send on wasm.
Structs§
- Memory
Store - In-memory chunk storage using a
RwLock<HashMap>. - Null
Loader - A no-op loader that always returns
ChunkStoreError::NotFound.
Enums§
- Chunk
Store Error - Errors from chunk storage operations.
Traits§
- Chunk
Get - Async chunk retrieval (primary API).
- Chunk
Has - Async chunk existence check (primary API).
- Chunk
Put - Async chunk storage (primary API,
&self). - Maybe
Send Sendon native targets, no bound on wasm32. The browser executor is single-threaded, so a getter future holding a JS handle across an await point is!Sendthere and must still satisfy the store traits.- Maybe
Sync Syncon native targets, no bound on wasm32. A browser store holding JS handles is!Sync; on the single-threaded wasm executor that is sound.