[][src]Trait libipld::store::ReadonlyStore

pub trait ReadonlyStore: Clone {
    fn get<'a>(&'a self, cid: &'a Cid) -> StoreResult<'a, Box<[u8]>>;
}

Implementable by ipld storage providers.

Required methods

fn get<'a>(&'a self, cid: &'a Cid) -> StoreResult<'a, Box<[u8]>>

Returns a block from the store. If the block is not in the store it fetches it from the network and pins the block. This future should be wrapped in a timeout. Dropping the future cancels the request.

Loading content...

Implementors

impl ReadonlyStore for MemStore[src]

Loading content...