pub struct LinkDirective<'a, F: FileSystem + UnixFileSystem + Default> { /* private fields */ }Expand description
A directive that can build LinkActions to create directories in the filesystem.
Implementations§
Source§impl<'a, F: FileSystem + UnixFileSystem + Default> LinkDirective<'a, F>where
LinkDirective<'a, F>: HasDirectiveData<'a> + Directive<'a>,
impl<'a, F: FileSystem + UnixFileSystem + Default> LinkDirective<'a, F>where
LinkDirective<'a, F>: HasDirectiveData<'a> + Directive<'a>,
Sourcepub fn parse_shortened_action(
&'a self,
context_settings: &Settings,
yaml: &StrictYaml,
current_dir: &Path,
) -> Result<LinkAction<'a, F>, DotfilesError>
pub fn parse_shortened_action( &'a self, context_settings: &Settings, yaml: &StrictYaml, current_dir: &Path, ) -> Result<LinkAction<'a, F>, DotfilesError>
Parse a shortened action with only link name to target name
Trait Implementations§
Source§impl<'a, F: FileSystem + UnixFileSystem + Default> ActionParser<'a> for LinkDirective<'a, F>
impl<'a, F: FileSystem + UnixFileSystem + Default> ActionParser<'a> for LinkDirective<'a, F>
Source§type ActionType = LinkAction<'a, F>
type ActionType = LinkAction<'a, F>
The action type this object parses
Source§fn parse_action(
&'a self,
settings: &Settings,
yaml: &StrictYaml,
current_directory: &Path,
) -> Result<LinkAction<'a, F>, DotfilesError>
fn parse_action( &'a self, settings: &Settings, yaml: &StrictYaml, current_directory: &Path, ) -> Result<LinkAction<'a, F>, 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
§fn parse_action_list(
&'a self,
settings: &HashMap<String, Setting>,
yaml: &StrictYaml,
current_dir: &Path,
) -> Result<Vec<Self::ActionType>, DotfilesError>
fn parse_action_list( &'a self, settings: &HashMap<String, Setting>, yaml: &StrictYaml, current_dir: &Path, ) -> Result<Vec<Self::ActionType>, DotfilesError>
Builds a list of actions of type [ActionParser::ActionType] from StrictYaml tree object
that represents the actions’ configurations and a default settings object. Read more
Source§impl<'a, F: Clone + FileSystem + UnixFileSystem + Default> Clone for LinkDirective<'a, F>
impl<'a, F: Clone + FileSystem + UnixFileSystem + Default> Clone for LinkDirective<'a, F>
Source§fn clone(&self) -> LinkDirective<'a, F>
fn clone(&self) -> LinkDirective<'a, F>
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, F: FileSystem + UnixFileSystem + Default> Default for LinkDirective<'a, F>
impl<'a, F: FileSystem + UnixFileSystem + Default> Default for LinkDirective<'a, F>
Source§impl<'a, F: FileSystem + UnixFileSystem + Default> Directive<'a> for LinkDirective<'a, F>
impl<'a, F: FileSystem + UnixFileSystem + Default> Directive<'a> for LinkDirective<'a, F>
§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, F: FileSystem + UnixFileSystem + Default> FileSystemDirective<'a, F> for LinkDirective<'a, F>
impl<'a, F: FileSystem + UnixFileSystem + Default> FileSystemDirective<'a, F> for LinkDirective<'a, F>
Source§impl<'a, F: FileSystem + UnixFileSystem + Default> HasDirectiveData<'a> for LinkDirective<'a, F>
impl<'a, F: FileSystem + UnixFileSystem + Default> HasDirectiveData<'a> for LinkDirective<'a, F>
Auto Trait Implementations§
impl<'a, F> Freeze for LinkDirective<'a, F>where
F: Freeze,
impl<'a, F> RefUnwindSafe for LinkDirective<'a, F>where
F: RefUnwindSafe,
impl<'a, F> Send for LinkDirective<'a, F>
impl<'a, F> Sync for LinkDirective<'a, F>where
F: Sync,
impl<'a, F> Unpin for LinkDirective<'a, F>where
F: Unpin,
impl<'a, F> UnwindSafe for LinkDirective<'a, F>where
F: UnwindSafe + RefUnwindSafe,
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