pkg/callback/
mod.rs

1#[cfg(feature = "indicatif")]
2pub use self::indicatif::IndicatifCallback;
3pub use self::plain::PlainCallback;
4#[cfg(feature = "indicatif")]
5mod indicatif;
6mod plain;
7
8pub trait Callback {
9    fn start_download(&mut self, length: u64, file: &str);
10    fn increment_downloaded(&mut self, downloaded: usize);
11    fn end_download(&mut self);
12
13    fn conflict(&mut self) {}
14
15    // todo: add error handeling
16    fn error(&mut self) {}
17}