Trait Installer

Source
pub trait Installer: Send {
    // Required methods
    fn init(&mut self, commands: &mut CommandQueue<InitCommand>);
    fn get_components(&mut self, cache: &Path) -> Vec<Component>;
    fn install_component(
        &mut self,
        component: &str,
        commands: &mut CommandQueue<InstallCommand>,
    );
}

Required Methods§

Source

fn init(&mut self, commands: &mut CommandQueue<InitCommand>)

Executes before any other function in order to prepare the environment for subsequent component installs

§Arguments
  • commands - the command queue to push commands into
Source

fn get_components(&mut self, cache: &Path) -> Vec<Component>

Returns all components this installer is able to install

§Arguments
  • cache - access to the cache path
Source

fn install_component( &mut self, component: &str, commands: &mut CommandQueue<InstallCommand>, )

Installs a given component

§Arguments
  • component - component name
  • commands - the command queue to push commands into

Implementors§