pub struct DirTask(_);Implementations
sourceimpl DirTask
impl DirTask
pub fn new(
stack: Weak<StackImpl>,
dir: DirId,
config: Arc<ChunkDownloadConfig>,
writers: Vec<Box<dyn ChunkWriter>>,
owner: ResourceManager,
task_cb: Option<StatisticTaskPtr>
) -> Self
pub fn dir_id(&self) -> &DirId
pub fn config(&self) -> &Arc<ChunkDownloadConfig>
pub fn as_statistic(&self) -> StatisticTaskPtr
Trait Implementations
sourceimpl DirTaskControl for DirTask
impl DirTaskControl for DirTask
fn add_meta(
&self,
chunk_list: ChunkListDesc,
writers: Vec<Box<dyn ChunkWriter>>
) -> BuckyResult<()>
fn add_chunk(
&self,
chunk: ChunkId,
writers: Vec<Box<dyn ChunkWriter>>
) -> BuckyResult<()>
fn add_file(
&self,
file: File,
writers: Vec<Box<dyn ChunkWriter>>
) -> BuckyResult<()>
fn add_dir(
&self,
dir: DirId,
writers: Vec<Box<dyn ChunkWriter>>
) -> BuckyResult<Box<dyn DirTaskControl>>
fn finish(&self) -> BuckyResult<()>
sourceimpl DownloadTask for DirTask
impl DownloadTask for DirTask
sourceimpl DownloadTaskControl for DirTask
impl DownloadTaskControl for DirTask
fn control_state(&self) -> TaskControlState
fn pause(&self) -> BuckyResult<TaskControlState>
fn resume(&self) -> BuckyResult<TaskControlState>
fn cancel(&self) -> BuckyResult<TaskControlState>
sourceimpl StatisticTask for DirTask
impl StatisticTask for DirTask
fn reset(&self)
fn on_stat(&self, size: u64) -> BuckyResult<Box<dyn PerfDataAbstract>>
fn stat(&self) -> BuckyResult<Box<dyn PerfDataAbstract>>
sourceimpl TaskSchedule for DirTask
impl TaskSchedule for DirTask
fn schedule_state(&self) -> TaskState
fn resource(&self) -> &ResourceManager
fn start(&self) -> TaskState
fn statistic_task(&self) -> Option<DynamicStatisticTask>
Auto Trait Implementations
impl !RefUnwindSafe for DirTask
impl Send for DirTask
impl Sync for DirTask
impl Unpin for DirTask
impl !UnwindSafe for DirTask
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more