BitswapSync

Trait BitswapSync 

Source
pub trait BitswapSync:
    Send
    + Sync
    + 'static {
    // Required methods
    fn references(
        &self,
        cid: &Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>,
    ) -> Box<dyn Iterator<Item = Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>>>;
    fn contains(
        &self,
        cid: &Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>,
    ) -> bool;
}
Expand description

Bitswap sync trait for customizing the syncing behaviour.

Required Methods§

Source

fn references( &self, cid: &Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>, ) -> Box<dyn Iterator<Item = Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>>>

Returns the list of blocks that need to be synced.

Source

fn contains( &self, cid: &Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>, ) -> bool

Returns if a cid needs to be synced.

Implementors§