Skip to main content

BlockLinksFilter

Trait BlockLinksFilter 

Source
pub trait BlockLinksFilter:
    Debug
    + BlockLinksFilterClone
    + Send
    + Sync {
    // Required methods
    fn filter(&self, cid: &Cid) -> bool;
    fn filter_block(&self, cid: &Cid, data: &[u8]) -> Result<bool, Error>;
}

Required Methods§

Source

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

Filter cid. Only cids which returned true will be returned.

Source

fn filter_block(&self, cid: &Cid, data: &[u8]) -> Result<bool, Error>

Filter the block if its links should be resolve at all.

Trait Implementations§

Source§

impl Clone for Box<dyn BlockLinksFilter>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Implementors§