pub trait ContentAddrStore: Send + Sync + 'static {
    fn get<'a>(&'a self, key: &[u8]) -> Option<Cow<'a, [u8]>>;
fn insert(&self, key: &[u8], value: &[u8]); fn realize(&self, hash: Hashed) -> Option<RawNode<'_>> { ... } }
Expand description

Trait that implements a thread-safe, concurrent low-level content addressed store.

Required methods

Gets a block by hash.

Inserts a block and its hash.

Provided methods

Helper function to realize a hash as a raw node. May override if caching, etc makes sense, but the default impl is reasonable in most cases.

Implementors