pub trait BlockDownloader: Send + Sync {
type Block: Block;
// Required methods
fn on_action(&mut self, action: DownloadAction);
fn poll(
&mut self,
cx: &mut Context<'_>,
) -> Poll<DownloadOutcome<Self::Block>>;
}
Expand description
A trait that can download blocks on demand.
Required Associated Types§
Required Methods§
Sourcefn on_action(&mut self, action: DownloadAction)
fn on_action(&mut self, action: DownloadAction)
Handle an action.