pub struct SimpleCallback;Expand description
简单的回调实现,只打印进度信息
Trait Implementations§
Source§impl Clone for SimpleCallback
impl Clone for SimpleCallback
Source§fn clone(&self) -> SimpleCallback
fn clone(&self) -> SimpleCallback
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ProgressCallback for SimpleCallback
impl ProgressCallback for SimpleCallback
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 SimpleCallback
impl RefUnwindSafe for SimpleCallback
impl Send for SimpleCallback
impl Sync for SimpleCallback
impl Unpin for SimpleCallback
impl UnwindSafe for SimpleCallback
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