pub trait DownloadTask: Send + Sync {
Show 16 methods // Required methods fn clone_as_task(&self) -> Box<dyn DownloadTask>; fn state(&self) -> DownloadTaskState; fn control_state(&self) -> DownloadTaskControlState; fn wait_user_canceled<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = BuckyError> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn cancel_by_error( &self, err: BuckyError ) -> BuckyResult<DownloadTaskControlState>; fn calc_speed(&self, when: Timestamp) -> u32; fn cur_speed(&self) -> u32; fn history_speed(&self) -> u32; // Provided methods fn resume(&self) -> BuckyResult<DownloadTaskControlState> { ... } fn cancel(&self) -> BuckyResult<DownloadTaskControlState> { ... } fn pause(&self) -> BuckyResult<DownloadTaskControlState> { ... } fn add_task( &self, _path: Option<String>, _sub: Box<dyn DownloadTask> ) -> BuckyResult<()> { ... } fn sub_task(&self, _path: &str) -> Option<Box<dyn DownloadTask>> { ... } fn on_post_add_to_root(&self, _abs_path: String) { ... } fn close(&self) -> BuckyResult<()> { ... } fn downloaded(&self) -> u64 { ... }
}

Required Methods§

source

fn clone_as_task(&self) -> Box<dyn DownloadTask>

source

fn state(&self) -> DownloadTaskState

source

fn control_state(&self) -> DownloadTaskControlState

source

fn wait_user_canceled<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = BuckyError> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source

fn cancel_by_error( &self, err: BuckyError ) -> BuckyResult<DownloadTaskControlState>

source

fn calc_speed(&self, when: Timestamp) -> u32

source

fn cur_speed(&self) -> u32

source

fn history_speed(&self) -> u32

Provided Methods§

Implementors§