pub struct FileTask(_);Implementations
sourceimpl FileTask
impl FileTask
pub fn new(
stack: Weak<StackImpl>,
file: File,
chunk_list: Option<ChunkListDesc>,
config: Arc<ChunkDownloadConfig>,
writers: Vec<Box<dyn ChunkWriter>>,
owner: ResourceManager,
task_cb: Option<StatisticTaskPtr>
) -> Self
pub fn with_ranges(
stack: Weak<StackImpl>,
file: File,
chunk_list: Option<ChunkListDesc>,
ranges: Option<Vec<Range<u64>>>,
config: Arc<ChunkDownloadConfig>,
writers: Vec<Box<dyn ChunkWriterExt>>,
owner: ResourceManager,
task_cb: Option<StatisticTaskPtr>
) -> Self
pub fn file(&self) -> &File
pub fn chunk_list(&self) -> &ChunkListDesc
pub fn ranges(&self) -> &Vec<(usize, Option<Range<u64>>)>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn config(&self) -> &Arc<ChunkDownloadConfig>
pub fn as_statistic(&self) -> Arc<dyn StatisticTask>
Trait Implementations
sourceimpl ChunkWriterExt for FileTask
impl ChunkWriterExt for FileTask
fn clone_as_writer(&self) -> Box<dyn ChunkWriterExt>ⓘNotable traits for Box<F, A>impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
fn err<'life0, 'async_trait>(
&'life0 self,
err: BuckyErrorCode
) -> Pin<Box<dyn Future<Output = BuckyResult<()>> + Send + 'async_trait>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output; where
'life0: 'async_trait,
Self: 'async_trait,
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
fn write<'life0, 'life1, 'async_trait>(
&'life0 self,
chunk: &'life1 ChunkId,
content: Arc<Vec<u8>>,
range: Option<Range<u64>>
) -> Pin<Box<dyn Future<Output = BuckyResult<()>> + Send + 'async_trait>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output; where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
fn finish<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = BuckyResult<()>> + Send + 'async_trait>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output; where
'life0: 'async_trait,
Self: 'async_trait,
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
sourceimpl DownloadTask for FileTask
impl DownloadTask for FileTask
sourceimpl DownloadTaskControl for FileTask
impl DownloadTaskControl for FileTask
fn control_state(&self) -> TaskControlState
fn pause(&self) -> BuckyResult<TaskControlState>
fn resume(&self) -> BuckyResult<TaskControlState>
fn cancel(&self) -> BuckyResult<TaskControlState>
sourceimpl StatisticTask for FileTask
impl StatisticTask for FileTask
fn reset(&self)
fn on_stat(&self, size: u64) -> BuckyResult<Box<dyn PerfDataAbstract>>
fn stat(&self) -> BuckyResult<Box<dyn PerfDataAbstract>>
sourceimpl TaskSchedule for FileTask
impl TaskSchedule for FileTask
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 FileTask
impl Send for FileTask
impl Sync for FileTask
impl Unpin for FileTask
impl !UnwindSafe for FileTask
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