pub struct ProgressBarCallback { /* private fields */ }Expand description
默认的进度回调实现(使用进度条)
Implementations§
Trait Implementations§
Source§impl Clone for ProgressBarCallback
impl Clone for ProgressBarCallback
Source§impl Default for ProgressBarCallback
impl Default for ProgressBarCallback
Source§impl ProgressCallback for ProgressBarCallback
impl ProgressCallback for ProgressBarCallback
Source§fn on_file_start<'life0, 'life1, 'async_trait>(
&'life0 self,
file_name: &'life1 str,
file_size: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_file_start<'life0, 'life1, 'async_trait>(
&'life0 self,
file_name: &'life1 str,
file_size: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
当文件下载开始时调用
Source§fn on_file_progress<'life0, 'life1, 'async_trait>(
&'life0 self,
file_name: &'life1 str,
downloaded: u64,
_total: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_file_progress<'life0, 'life1, 'async_trait>(
&'life0 self,
file_name: &'life1 str,
downloaded: u64,
_total: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
当文件下载进度更新时调用
Auto Trait Implementations§
impl Freeze for ProgressBarCallback
impl RefUnwindSafe for ProgressBarCallback
impl Send for ProgressBarCallback
impl Sync for ProgressBarCallback
impl Unpin for ProgressBarCallback
impl UnwindSafe for ProgressBarCallback
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