pub trait BitswapStoreRead {
    // Required methods
    fn contains(&self, cid: &Cid) -> Result<bool>;
    fn get(&self, cid: &Cid) -> Result<Option<Vec<u8>>>;
}
Expand description

Trait implemented by a block store for reading.

Required Methods§

source

fn contains(&self, cid: &Cid) -> Result<bool>

A have query needs to know if the block store contains the block.

source

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

A block query needs to retrieve the block from the store.

Implementations on Foreign Types§

source§

impl<T: BitswapStoreRead> BitswapStoreRead for Arc<T>

source§

fn contains(&self, cid: &Cid) -> Result<bool>

source§

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

Implementors§