ProgressReporter

Trait ProgressReporter 

Source
pub trait ProgressReporter: Send + Sync {
    // Required methods
    fn start<'life0, 'life1, 'async_trait>(
        &'life0 self,
        message: &'life1 str,
        total: Option<u64>,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn update<'life0, 'life1, 'async_trait>(
        &'life0 self,
        position: u64,
        message: Option<&'life1 str>,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn increment<'life0, 'async_trait>(
        &'life0 self,
        delta: u64,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn finish<'life0, 'life1, 'async_trait>(
        &'life0 self,
        message: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn finish_with_error<'life0, 'life1, 'async_trait>(
        &'life0 self,
        message: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn set_total<'life0, 'async_trait>(
        &'life0 self,
        total: u64,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Progress reporting interface for installation operations

Required Methods§

Source

fn start<'life0, 'life1, 'async_trait>( &'life0 self, message: &'life1 str, total: Option<u64>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Start a new progress operation

Source

fn update<'life0, 'life1, 'async_trait>( &'life0 self, position: u64, message: Option<&'life1 str>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Update progress with current position

Source

fn increment<'life0, 'async_trait>( &'life0 self, delta: u64, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Increment progress by a delta

Source

fn finish<'life0, 'life1, 'async_trait>( &'life0 self, message: &'life1 str, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Finish the progress operation

Source

fn finish_with_error<'life0, 'life1, 'async_trait>( &'life0 self, message: &'life1 str, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Finish with an error message

Source

fn set_total<'life0, 'async_trait>( &'life0 self, total: u64, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Set the total size (useful when total is unknown initially)

Implementors§