pub trait BodyDownloader:
Send
+ Sync
+ Stream<Item = BodyDownloaderResult<Self::Body>>
+ Unpin {
type Body: Debug + Send + Sync + Unpin + '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§
Required Methods§
Sourcefn set_download_range(
&mut self,
range: RangeInclusive<BlockNumber>,
) -> DownloadResult<()>
fn set_download_range( &mut self, range: RangeInclusive<BlockNumber>, ) -> DownloadResult<()>
Method for setting the download range.