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