pub trait AcquireProgress {
    // Required methods
    fn pulse_interval(&self) -> usize;
    fn hit(&mut self, id: u32, description: String);
    fn fetch(&mut self, id: u32, description: String, file_size: u64);
    fn fail(
        &mut self,
        id: u32,
        description: String,
        status: u32,
        error_text: String
    );
    fn pulse(
        &mut self,
        workers: Vec<Worker>,
        percent: f32,
        total_bytes: u64,
        current_bytes: u64,
        current_cps: u64
    );
    fn done(&mut self);
    fn start(&mut self);
    fn stop(
        &mut self,
        fetched_bytes: u64,
        elapsed_time: u64,
        current_cps: u64,
        pending_errors: bool
    );
}
Expand description

Trait you can impl on any struct to customize the output shown during file downloads.

Required Methods§

source

fn pulse_interval(&self) -> usize

Called on c++ to set the pulse interval.

source

fn hit(&mut self, id: u32, description: String)

Called when an item is confirmed to be up-to-date.

source

fn fetch(&mut self, id: u32, description: String, file_size: u64)

Called when an Item has started to download

source

fn fail( &mut self, id: u32, description: String, status: u32, error_text: String )

Called when an Item fails to download

source

fn pulse( &mut self, workers: Vec<Worker>, percent: f32, total_bytes: u64, current_bytes: u64, current_cps: u64 )

Called periodically to provide the overall progress information

source

fn done(&mut self)

Called when an item is successfully and completely fetched.

source

fn start(&mut self)

Called when progress has started

source

fn stop( &mut self, fetched_bytes: u64, elapsed_time: u64, current_cps: u64, pending_errors: bool )

Called when progress has finished

Trait Implementations§

source§

impl ExternType for Box<dyn AcquireProgress>

Impl for sending AcquireProgress across the barrier.

§

type Id = (D, y, n, A, c, q, u, i, r, e, P, r, o, g, r, e, s, s)

A type-level representation of the type’s C++ namespace and type name. Read more
§

type Kind = Trivial

Implementors§