Skip to main content

conduit_cli/core/installer/
extra_deps.rs

1#[derive(Debug, Clone)]
2pub enum ExtraDepsPolicy {
3    Skip,
4    AutoExactMatch,
5    Callback,
6}
7
8#[derive(Debug, Clone)]
9pub struct ExtraDepCandidate {
10    pub title: String,
11    pub slug: String,
12    pub is_exact_match: bool,
13}
14
15#[derive(Debug, Clone)]
16pub struct ExtraDepRequest {
17    pub tech_id: String,
18    pub parent_slug: String,
19    pub parent_filename: String,
20    pub candidates: Vec<ExtraDepCandidate>,
21}
22
23#[derive(Debug, Clone)]
24pub enum ExtraDepDecision {
25    Skip,
26    InstallSlug(String),
27}
28
29pub trait ExtraDepChooser {
30    fn choose_extra_dep(&mut self, _request: ExtraDepRequest) -> ExtraDepDecision {
31        ExtraDepDecision::Skip
32    }
33}
34
35pub trait InstallerUi: crate::core::events::CoreCallbacks + ExtraDepChooser {}
36
37impl<T> InstallerUi for T where T: crate::core::events::CoreCallbacks + ExtraDepChooser {}