pub struct DownloadFile { /* private fields */ }Expand description
Down file handler
Implementations§
Source§impl DownloadFile
impl DownloadFile
Sourcepub async fn start_download<U: IntoUrl>(
url: U,
save_path: PathBuf,
task_count: u64,
block: u64,
) -> Result<Self, DownloadError>
pub async fn start_download<U: IntoUrl>( url: U, save_path: PathBuf, task_count: u64, block: u64, ) -> Result<Self, DownloadError>
start download now
Sourcepub fn get_status(&self) -> Arc<DownloadInner>
pub fn get_status(&self) -> Arc<DownloadInner>
get status arc
Sourcepub fn get_down_size(&self) -> u64
pub fn get_down_size(&self) -> u64
get down size
Sourcepub fn get_error(&self) -> Option<&DownloadError>
pub fn get_error(&self) -> Option<&DownloadError>
get error
Sourcepub fn get_real_file_path(&self) -> String
pub fn get_real_file_path(&self) -> String
get save file real path
Auto Trait Implementations§
impl Freeze for DownloadFile
impl !RefUnwindSafe for DownloadFile
impl Send for DownloadFile
impl Sync for DownloadFile
impl Unpin for DownloadFile
impl !UnwindSafe for DownloadFile
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