Struct garden::model::Configuration
source · [−]pub struct Configuration {Show 16 fields
pub commands: Vec<MultiVariable>,
pub debug: HashSet<String>,
pub environment: Vec<MultiVariable>,
pub gardens: Vec<Garden>,
pub grafts: Vec<Graft>,
pub groups: Vec<Group>,
pub path: Option<PathBuf>,
pub dirname: Option<PathBuf>,
pub root: Variable,
pub root_path: PathBuf,
pub shell: String,
pub templates: Vec<Template>,
pub tree_search_path: Vec<PathBuf>,
pub trees: Vec<Tree>,
pub variables: Vec<NamedVariable>,
pub verbose: bool,
/* private fields */
}
Fields
commands: Vec<MultiVariable>
debug: HashSet<String>
environment: Vec<MultiVariable>
gardens: Vec<Garden>
grafts: Vec<Graft>
groups: Vec<Group>
path: Option<PathBuf>
dirname: Option<PathBuf>
root: Variable
root_path: PathBuf
shell: String
templates: Vec<Template>
tree_search_path: Vec<PathBuf>
trees: Vec<Tree>
variables: Vec<NamedVariable>
verbose: bool
Implementations
sourceimpl Configuration
impl Configuration
pub fn initialize(&mut self)
pub fn reset(&mut self)
sourcepub fn eval_tree_path(&mut self, path: &str) -> String
pub fn eval_tree_path(&mut self, path: &str) -> String
Evaluate and return a path string relative to the garden root.
sourcepub fn config_path(&self, path: &str) -> String
pub fn config_path(&self, path: &str) -> String
Resolve a path string relative to the config dir.
sourcepub fn eval_config_path(&self, path: &str) -> String
pub fn eval_config_path(&self, path: &str) -> String
Evaluate and resolve a path string and relative to the config dir.
sourcepub fn reset_variables(&mut self)
pub fn reset_variables(&mut self)
Reset resolved variables
pub fn get_id(&self) -> Option<ConfigId>
sourcepub fn set_parent(&mut self, id: ConfigId)
pub fn set_parent(&mut self, id: ConfigId)
Set the parent ConfigId from the Arena for this configuration.
sourcepub fn get_path(&self) -> Result<&PathBuf, GardenError>
pub fn get_path(&self) -> Result<&PathBuf, GardenError>
Get the config path if it is defined.
sourcepub fn contains_graft(&self, name: &str) -> bool
pub fn contains_graft(&self, name: &str) -> bool
Return true if the configuration contains the named graft.
Trait Implementations
sourceimpl Clone for Configuration
impl Clone for Configuration
sourcefn clone(&self) -> Configuration
fn clone(&self) -> Configuration
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Configuration
impl Debug for Configuration
sourceimpl Default for Configuration
impl Default for Configuration
sourcefn default() -> Configuration
fn default() -> Configuration
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl !RefUnwindSafe for Configuration
impl Send for Configuration
impl !Sync for Configuration
impl Unpin for Configuration
impl UnwindSafe for Configuration
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more