Skip to main content

BlockFetcher

Trait BlockFetcher 

Source
pub trait BlockFetcher: Send + Sync {
    // Required method
    fn fetch(&self, cid: Cid) -> BoxFuture<'_, Result<Block>>;
}
Expand description

Block fetcher trait for retrieving blocks by CID

Required Methods§

Source

fn fetch(&self, cid: Cid) -> BoxFuture<'_, Result<Block>>

Fetch a block by its CID

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§