Skip to main content

Module store

Module store 

Source
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§

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).
MaybeSend
Send on 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 !Send there and must still satisfy the store traits.
MaybeSync
Sync on native targets, no bound on wasm32. A browser store holding JS handles is !Sync; on the single-threaded wasm executor that is sound.