Trait rust_apt::raw::progress::AcquireProgress
source · 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§
sourcefn pulse_interval(&self) -> usize
fn pulse_interval(&self) -> usize
Called on c++ to set the pulse interval.
sourcefn hit(&mut self, id: u32, description: String)
fn hit(&mut self, id: u32, description: String)
Called when an item is confirmed to be up-to-date.
sourcefn fetch(&mut self, id: u32, description: String, file_size: u64)
fn fetch(&mut self, id: u32, description: String, file_size: u64)
Called when an Item has started to download
sourcefn fail(
&mut self,
id: u32,
description: String,
status: u32,
error_text: String
)
fn fail( &mut self, id: u32, description: String, status: u32, error_text: String )
Called when an Item fails to download