Skip to main content

SystemConfigurator

Trait SystemConfigurator 

Source
pub trait SystemConfigurator: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn is_available(&self) -> bool;
    fn current_state(&self) -> Result<Value>;
    fn diff(&self, desired: &Value) -> Result<Vec<SystemDrift>>;
    fn apply(&self, desired: &Value, printer: &Printer) -> Result<()>;
}

Required Methods§

Source

fn name(&self) -> &str

Configurator name — must match the key in the profile’s system: map

Source

fn is_available(&self) -> bool

Source

fn current_state(&self) -> Result<Value>

Read current state from the system

Source

fn diff(&self, desired: &Value) -> Result<Vec<SystemDrift>>

Diff desired vs actual, return list of changes

Source

fn apply(&self, desired: &Value, printer: &Printer) -> Result<()>

Apply desired state

Implementors§