[][src]Trait libp2p_bitswap::BitswapSync

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

Bitswap sync trait for customizing the syncing behaviour.

Required methods

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

Returns the list of blocks that need to be synced.

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

Returns if a cid needs to be synced.

Loading content...

Implementors

Loading content...