conduit_cli/core/
events.rs1#[derive(Debug, Clone)]
2pub enum CoreEvent {
3 Info(String),
4 Warning(String),
5 Installed { slug: String, title: String },
6 AddedAsDependency { slug: String },
7 AlreadyInstalled { slug: String },
8 LinkedFile { filename: String },
9 Purged { slug: String },
10}
11
12#[derive(Debug, Clone)]
13pub struct DownloadProgress {
14 pub bytes_downloaded: u64,
15 pub total_bytes: Option<u64>,
16 pub filename: String,
17}
18
19pub trait CoreCallbacks {
20 fn on_event(&mut self, _event: CoreEvent) {}
21 fn on_download_progress(&mut self, _progress: DownloadProgress) {}
22}