pub trait Progress {
    // Required methods
    fn set_file_size<'life0, 'async_trait>(
        &'life0 mut self,
        size: usize
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn add_to_progress<'life0, 'async_trait>(
        &'life0 mut self,
        amount: usize
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn remove_from_progress<'life0, 'async_trait>(
        &'life0 mut self,
        bytes: usize
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

source

fn set_file_size<'life0, 'async_trait>( &'life0 mut self, size: usize ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Sets the file size with size

source

fn add_to_progress<'life0, 'async_trait>( &'life0 mut self, amount: usize ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Add to the progress with amount

source

fn remove_from_progress<'life0, 'async_trait>( &'life0 mut self, bytes: usize ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

In the case of corrupted bytes we want to reduce the progress, or reset it to 0.

Implementors§