Trait BodyDownloader

Source
pub trait BodyDownloader:
    Send
    + Sync
    + Stream<Item = BodyDownloaderResult<Self::Block>>
    + Unpin {
    type Block: Block + 'static;

    // Required method
    fn set_download_range(
        &mut self,
        range: RangeInclusive<BlockNumber>,
    ) -> DownloadResult<()>;
}
Expand description

A downloader capable of fetching and yielding block bodies from block headers.

A downloader represents a distinct strategy for submitting requests to download block bodies, while a BodiesClient represents a client capable of fulfilling these requests.

Required Associated Types§

Source

type Block: Block + 'static

The Block type this downloader supports

Required Methods§

Source

fn set_download_range( &mut self, range: RangeInclusive<BlockNumber>, ) -> DownloadResult<()>

Method for setting the download range.

Implementors§