pub struct DownloadManagerBuilder<'a, S: State = Empty> { /* private fields */ }
Expand description
Use builder syntax to set the inputs and finish with build()
.
Implementations§
Source§impl<'a, S: State> DownloadManagerBuilder<'a, S>
impl<'a, S: State> DownloadManagerBuilder<'a, S>
Sourcepub fn build(self) -> DownloadManager<'a>where
S: IsComplete,
pub fn build(self) -> DownloadManager<'a>where
S: IsComplete,
Finish building and return the requested object
Sourcepub fn client(
self,
value: &'a Client,
) -> DownloadManagerBuilder<'a, SetClient<S>>where
S::Client: IsUnset,
pub fn client(
self,
value: &'a Client,
) -> DownloadManagerBuilder<'a, SetClient<S>>where
S::Client: IsUnset,
Required.
Sourcepub fn download_list(
self,
value: &'a [DownloadEntry],
) -> DownloadManagerBuilder<'a, SetDownloadList<S>>where
S::DownloadList: IsUnset,
pub fn download_list(
self,
value: &'a [DownloadEntry],
) -> DownloadManagerBuilder<'a, SetDownloadList<S>>where
S::DownloadList: IsUnset,
Required.
Sourcepub fn threads(self, value: usize) -> DownloadManagerBuilder<'a, SetThreads<S>>where
S::Threads: IsUnset,
pub fn threads(self, value: usize) -> DownloadManagerBuilder<'a, SetThreads<S>>where
S::Threads: IsUnset,
Sourcepub fn maybe_threads(
self,
value: Option<usize>,
) -> DownloadManagerBuilder<'a, SetThreads<S>>where
S::Threads: IsUnset,
pub fn maybe_threads(
self,
value: Option<usize>,
) -> DownloadManagerBuilder<'a, SetThreads<S>>where
S::Threads: IsUnset,
Sourcepub fn retry_times(
self,
value: usize,
) -> DownloadManagerBuilder<'a, SetRetryTimes<S>>where
S::RetryTimes: IsUnset,
pub fn retry_times(
self,
value: usize,
) -> DownloadManagerBuilder<'a, SetRetryTimes<S>>where
S::RetryTimes: IsUnset,
Sourcepub fn maybe_retry_times(
self,
value: Option<usize>,
) -> DownloadManagerBuilder<'a, SetRetryTimes<S>>where
S::RetryTimes: IsUnset,
pub fn maybe_retry_times(
self,
value: Option<usize>,
) -> DownloadManagerBuilder<'a, SetRetryTimes<S>>where
S::RetryTimes: IsUnset,
Sourcepub fn total_size(
self,
value: u64,
) -> DownloadManagerBuilder<'a, SetTotalSize<S>>where
S::TotalSize: IsUnset,
pub fn total_size(
self,
value: u64,
) -> DownloadManagerBuilder<'a, SetTotalSize<S>>where
S::TotalSize: IsUnset,
Sourcepub fn maybe_total_size(
self,
value: Option<u64>,
) -> DownloadManagerBuilder<'a, SetTotalSize<S>>where
S::TotalSize: IsUnset,
pub fn maybe_total_size(
self,
value: Option<u64>,
) -> DownloadManagerBuilder<'a, SetTotalSize<S>>where
S::TotalSize: IsUnset,
Sourcepub fn set_permission(
self,
value: u32,
) -> DownloadManagerBuilder<'a, SetSetPermission<S>>where
S::SetPermission: IsUnset,
pub fn set_permission(
self,
value: u32,
) -> DownloadManagerBuilder<'a, SetSetPermission<S>>where
S::SetPermission: IsUnset,
Sourcepub fn maybe_set_permission(
self,
value: Option<u32>,
) -> DownloadManagerBuilder<'a, SetSetPermission<S>>where
S::SetPermission: IsUnset,
pub fn maybe_set_permission(
self,
value: Option<u32>,
) -> DownloadManagerBuilder<'a, SetSetPermission<S>>where
S::SetPermission: IsUnset,
Sourcepub fn timeout(
self,
value: Duration,
) -> DownloadManagerBuilder<'a, SetTimeout<S>>where
S::Timeout: IsUnset,
pub fn timeout(
self,
value: Duration,
) -> DownloadManagerBuilder<'a, SetTimeout<S>>where
S::Timeout: IsUnset,
Sourcepub fn maybe_timeout(
self,
value: Option<Duration>,
) -> DownloadManagerBuilder<'a, SetTimeout<S>>where
S::Timeout: IsUnset,
pub fn maybe_timeout(
self,
value: Option<Duration>,
) -> DownloadManagerBuilder<'a, SetTimeout<S>>where
S::Timeout: IsUnset,
Auto Trait Implementations§
impl<'a, S> Freeze for DownloadManagerBuilder<'a, S>
impl<'a, S = Empty> !RefUnwindSafe for DownloadManagerBuilder<'a, S>
impl<'a, S> Send for DownloadManagerBuilder<'a, S>
impl<'a, S> Sync for DownloadManagerBuilder<'a, S>
impl<'a, S> Unpin for DownloadManagerBuilder<'a, S>
impl<'a, S = Empty> !UnwindSafe for DownloadManagerBuilder<'a, S>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more