pub trait CborStore: Blockstore + Sized {
    // Provided methods
    fn get_cbor<T>(&self, cid: &Cid) -> Result<Option<T>>
       where T: DeserializeOwned { ... }
    fn put_cbor<S>(&self, obj: &S, code: Code) -> Result<Cid>
       where S: Serialize { ... }
}
Expand description

Wrapper for database to handle inserting and retrieving ipld data with Cids

Provided Methods§

source

fn get_cbor<T>(&self, cid: &Cid) -> Result<Option<T>>where T: DeserializeOwned,

Get typed object from block store by Cid.

source

fn put_cbor<S>(&self, obj: &S, code: Code) -> Result<Cid>where S: Serialize,

Put an object in the block store and return the Cid identifier.

Implementors§