[][src]Trait ipfs_embed_core::BitswapSync

pub trait BitswapSync: 'static + Send + Sync {
    fn references(&self, cid: &Cid) -> Box<dyn Iterator<Item = Cid> + 'static>;
fn contains(&self, cid: &Cid) -> bool; }

Bitswap sync trait for customizing the syncing behaviour.

Required methods

fn references(&self, cid: &Cid) -> Box<dyn Iterator<Item = Cid> + 'static>

Returns the list of blocks that need to be synced.

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

Returns if a cid needs to be synced.

Loading content...

Implementors

impl<S: StoreParams, T: Storage<S>> BitswapSync for BitswapStorage<S, T> where
    Ipld: Decode<S::Codecs>, 
[src]

Loading content...