pub struct Variable { /* private fields */ }
Expand description

Config files can define a sequence of variables that are iteratively calculated. Variables can reference other variables in their Tree, Garden, and Configuration scopes.

The config values can contain either plain values, string ${expressions} that resolve against other Variables, or exec expressions that evaluate to a command whose stdout is captured and placed into the value of the variable.

An exec expression can use shell-like ${variable} references as which are substituted when evaluating the command, just like a regular string expression. An exec expression is denoted by using a “$ “ (dollar-sign followed by space) before the value. For example, using “$ echo foo” will place the value “foo” in the variable.

Implementations

Does this variable have a value?

Transform the RefCell<Option> value into an Option<&String>.

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 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.