Struct garden::model::Configuration

source ·
pub struct Configuration {
Show 16 fields pub commands: Vec<MultiVariable>, pub debug: HashMap<String, u8>, 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: HashMap<String, Template>, pub tree_search_path: Vec<PathBuf>, pub trees: Vec<Tree>, pub variables: Vec<NamedVariable>, pub verbose: u8, /* private fields */
}

Fields§

§commands: Vec<MultiVariable>§debug: HashMap<String, u8>§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: HashMap<String, Template>§tree_search_path: Vec<PathBuf>§trees: Vec<Tree>§variables: Vec<NamedVariable>§verbose: u8

Implementations§

Create a default Configuration

Return a path string relative to the garden root

Return a pathbuf relative to the garden root.

Evaluate and return a path string relative to the garden root.

Resolve a pathbuf relative to the config directory.

Resolve a pathbuf relative to specified include file or the config directory. Returns the first file found. The include file’s directory is checked first.

Resolve a path string relative to the config directory.

Evaluate and resolve a path string and relative to the config directory.

Evaluate and resolve a pathbuf relative to the config directory.

Evaluate and resolve a pathbuf relative to the config directory for “includes”.

Reset resolved variables

Set the ConfigId from the Arena for this configuration.

Set the parent ConfigId from the Arena for this configuration.

Set the config path and the dirname fields

Get the config path if it is defined.

Get a path string for this configuration. Returns the current directory when the configuration does not have a valid path.

Return true if the configuration contains the named graft.

Return a graft by name.

Find a tree by name and return a reference if it exists.

Return a pathbuf for the specified Tree index

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.