pub struct BrewDirective<'a> { /* private fields */ }Expand description
A directive that can build BrewActions to install formulae, casks
Trait Implementations§
Source§impl<'a> ActionParser<'a> for BrewDirective<'a>
 
impl<'a> ActionParser<'a> for BrewDirective<'a>
Source§fn parse_action_list(
    &'a self,
    context_settings: &Settings,
    yaml: &StrictYaml,
    current_dir: &Path,
) -> Result<Vec<BrewAction<'a>>, DotfilesError>
 
fn parse_action_list( &'a self, context_settings: &Settings, yaml: &StrictYaml, current_dir: &Path, ) -> Result<Vec<BrewAction<'a>>, DotfilesError>
Parse the list of actions from yaml, in this case it’s only one action so this function only wraps BrewDirective::parse_action
Source§type ActionType = BrewAction<'a>
 
type ActionType = BrewAction<'a>
The action type this object parses
Source§fn parse_action(
    &'a self,
    context_settings: &Settings,
    yaml: &StrictYaml,
    _: &Path,
) -> Result<BrewAction<'a>, DotfilesError>
 
fn parse_action( &'a self, context_settings: &Settings, yaml: &StrictYaml, _: &Path, ) -> Result<BrewAction<'a>, DotfilesError>
Builds a single action of type [ActionParser::ActionType] from StrictYaml tree object
that represents the action’s configuration and a default settings object. Read more
Source§impl<'a> Clone for BrewDirective<'a>
 
impl<'a> Clone for BrewDirective<'a>
Source§fn clone(&self) -> BrewDirective<'a>
 
fn clone(&self) -> BrewDirective<'a>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moreSource§impl<'a> Default for BrewDirective<'a>
 
impl<'a> Default for BrewDirective<'a>
Source§fn default() -> BrewDirective<'a>
 
fn default() -> BrewDirective<'a>
Returns the “default value” for a type. Read more
Source§impl<'a> Directive<'a> for BrewDirective<'a>
 
impl<'a> Directive<'a> for BrewDirective<'a>
§fn get_setting_from_yaml_hash_or_from_context(
    &'a self,
    name: &str,
    yaml: &StrictYaml,
    context_settings: &HashMap<String, Setting>,
) -> Result<Setting, DotfilesError>
 
fn get_setting_from_yaml_hash_or_from_context( &'a self, name: &str, yaml: &StrictYaml, context_settings: &HashMap<String, Setting>, ) -> Result<Setting, DotfilesError>
Parse a particular setting with its correct type from yaml, fall back to context settings or
directive defaults if not found in yaml. Returns error if there is any kind of parsing or
typing error
§fn get_setting_from_yaml_hash(
    &'a self,
    name: &str,
    yaml: &StrictYaml,
) -> Result<Setting, DotfilesError>
 
fn get_setting_from_yaml_hash( &'a self, name: &str, yaml: &StrictYaml, ) -> Result<Setting, DotfilesError>
Parses an individual setting named 
name from a yaml hash using the type stored in
DirectiveData.setting_types.Source§impl<'a> HasDirectiveData<'a> for BrewDirective<'a>
 
impl<'a> HasDirectiveData<'a> for BrewDirective<'a>
Auto Trait Implementations§
impl<'a> Freeze for BrewDirective<'a>
impl<'a> RefUnwindSafe for BrewDirective<'a>
impl<'a> Send for BrewDirective<'a>
impl<'a> Sync for BrewDirective<'a>
impl<'a> Unpin for BrewDirective<'a>
impl<'a> UnwindSafe for BrewDirective<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
Source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
 
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more