Trait fvm_ipld_encoding::CborStore

source ·
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>>

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.

Object Safety§

This trait is not object safe.

Implementors§