Struct cargo::util::config::ConfigKey [−][src]
pub struct ConfigKey { /* fields omitted */ }
Expand description
Key for a configuration variable.
This type represents a configuration variable that we’re looking up in Cargo’s configuration. This structure simultaneously keeps track of a corresponding environment variable name as well as a TOML config name. The intention here is that this is built up and torn down over time efficiently, avoiding clones and such as possible.
Implementations
Creates a new blank configuration key which is ready to get built up by
using push
and push_sensitive
.
Creates a ConfigKey
from the key
specified.
The key
specified is expected to be a period-separated toml
configuration key.
Pushes a new sub-key on this ConfigKey
. This sub-key should be
equivalent to accessing a sub-table in TOML.
Note that this considers name
to be case-insensitive, meaning that the
corrseponding toml key is appended with this name
as-is and the
corresponding env key is appended with name
after transforming it to
uppercase characters.
Performs the same function as push
except that the corresponding
environment variable does not get the uppercase letters of name
but
instead name
is pushed raw onto the corresponding environment
variable.
Rewinds this ConfigKey
back to the state it was at before the last
push
method being called.
Returns the corresponding environment variable key for this configuration value.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ConfigKey
impl UnwindSafe for ConfigKey
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V