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§
Sourcefn init(&mut self, commands: &mut CommandQueue<InitCommand>)
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
Sourcefn get_components(&mut self, cache: &Path) -> Vec<Component>
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
Sourcefn install_component(
&mut self,
component: &str,
commands: &mut CommandQueue<InstallCommand>,
)
fn install_component( &mut self, component: &str, commands: &mut CommandQueue<InstallCommand>, )
Installs a given component
§Arguments
component
- component namecommands
- the command queue to push commands into