pub trait InstallCommand<F: Display> {
// Required methods
fn base_command(&self) -> Exec;
fn args(&self) -> &Vec<String>;
fn action_description(&self) -> &str;
fn action_name(&self) -> &str;
fn items(&self) -> &Vec<F>;
// Provided methods
fn formatted_item_list(&self) -> Vec<String> { ... }
fn execute(&self) -> Result<(), DotfilesError> { ... }
}
Expand description
Trait that represents a command that installs an item using an action (brew install, brew install cask, apt install…)
Required Methods§
sourcefn base_command(&self) -> Exec
fn base_command(&self) -> Exec
The base command to run
sourcefn action_description(&self) -> &str
fn action_description(&self) -> &str
The description of the action to run, i.e. “Installing cask”
sourcefn action_name(&self) -> &str
fn action_name(&self) -> &str
The name of the action to run, i.e. “cask”
Provided Methods§
sourcefn formatted_item_list(&self) -> Vec<String>
fn formatted_item_list(&self) -> Vec<String>
a list of items to display