BlobStore

Trait BlobStore 

Source
pub trait BlobStore:
    Send
    + Sync
    + 'static {
    // Required methods
    fn put(&self, bytes: Vec<u8>) -> BlobFuture<'_, BlobHash>;
    fn get(&self, hash: BlobHash) -> BlobFuture<'_, Option<Vec<u8>>>;
    fn list(&self) -> BlobFuture<'_, Vec<BlobHash>>;

    // Provided method
    fn claim(&self, _hash: BlobHash) -> BlobFuture<'_, ()> { ... }
}
Expand description

The minimal immutable-byte boundary required by the metadata store.

Required Methods§

Source

fn put(&self, bytes: Vec<u8>) -> BlobFuture<'_, BlobHash>

Stores exact bytes durably and returns their BLAKE3 content hash.

Source

fn get(&self, hash: BlobHash) -> BlobFuture<'_, Option<Vec<u8>>>

Loads exact bytes when the hash is available locally.

Source

fn list(&self) -> BlobFuture<'_, Vec<BlobHash>>

Lists locally complete immutable objects in deterministic hash order.

Provided Methods§

Source

fn claim(&self, _hash: BlobHash) -> BlobFuture<'_, ()>

Records that an already stored immutable object belongs to the caller’s domain context.

Stores without domain metadata may keep the default no-op implementation.

Implementors§