Trait rust_apt::progress::AcquireProgress
source · [−]pub trait AcquireProgress {
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.
Called when an item is confirmed to be up-to-date.
Called when an Item has started to download
Called when an Item fails to download
Called periodically to provide the overall progress information
Trait Implementations
sourceimpl ExternType for Box<dyn AcquireProgress>
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)
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
type Kind = Trivial
Either cxx::kind::Opaque or cxx::kind::Trivial. Read more