[][src]Trait download_async::Progress

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

Required methods

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

#[must_use]fn get_file_size<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = usize> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

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

Add to the progress with amount

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

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

#[must_use]fn get_progess<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = usize> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Loading content...

Implementors

Loading content...