Trait NdnTask
Source pub trait NdnTask: Send + Sync {
// Required methods
fn clone_as_task(&self) -> Box<dyn NdnTask>;
fn state(&self) -> NdnTaskState;
fn control_state(&self) -> NdnTaskControlState;
fn cur_speed(&self) -> u32;
fn history_speed(&self) -> u32;
fn transfered(&self) -> u64;
// Provided methods
fn resume(&self) -> BuckyResult<NdnTaskControlState> { ... }
fn cancel(&self) -> BuckyResult<NdnTaskControlState> { ... }
fn cancel_by_error(
&self,
_err: BuckyError,
) -> BuckyResult<NdnTaskControlState> { ... }
fn pause(&self) -> BuckyResult<NdnTaskControlState> { ... }
fn close(&self, _recursion: bool) -> BuckyResult<()> { ... }
}