Trait forest_filecoin::utils::db::BlockstoreExt

source ·
pub trait BlockstoreExt: Blockstore {
    // Provided methods
    fn bulk_put<'a, S, V>(&self, values: V, code: Code) -> Result<Vec<Cid>>
       where Self: Sized,
             S: Serialize + 'a,
             V: IntoIterator<Item = &'a S> { ... }
    fn get_required(&self, cid: &Cid) -> Result<Vec<u8>> { ... }
}
Expand description

Extension methods for inserting and retrieving IPLD data with CIDs

Provided Methods§

source

fn bulk_put<'a, S, V>(&self, values: V, code: Code) -> Result<Vec<Cid>>
where Self: Sized, S: Serialize + 'a, V: IntoIterator<Item = &'a S>,

Batch put CBOR objects into block store and returns vector of CIDs

source

fn get_required(&self, cid: &Cid) -> Result<Vec<u8>>

Gets the block from the blockstore. Return an error when not found.

Implementors§