pub trait ChunkStore: Send + Sync {
// Required methods
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
digest: &'life1 B3Digest,
) -> Pin<Box<dyn Future<Output = Result<Option<Chunk>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn has<'life0, 'life1, 'async_trait>(
&'life0 self,
digest: &'life1 B3Digest,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn put<'life0, 'async_trait>(
&'life0 self,
chunk: Chunk,
) -> Pin<Box<dyn Future<Output = Result<B3Digest, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Allows reading (or uploading) content-addressed chunks of raw data.
BLAKE3 is used as a hashing function for the data. Uploading a blob will return the BLAKE3 digest of it, and that’s the identifier used to Read/Stat them too.
Chunks are considered small enough to not require any further chunking.