pub enum Env {
AliasPrivileged,
AliasExecutable,
RecursionDepth,
LogLevel,
}
Expand description
Application-wide environment variables.
Variants§
AliasPrivileged
If this variable is defined, an alias is executed with elevated privileges.
AliasExecutable
Name or absolute path of the cnf
executable to resolve aliases with.
This is only used when resolving aliases and can be used to override the cnf
version e.g.
for development purposes to test newer features, like so:
$ CNF_ALIAS_EXECUTABLE="$PWD/target/debug/cnf" podman image ls
RecursionDepth
Set by the application to keep track of how many recursion levels are currently used by e.g. alias execution.
LogLevel
Overwrite the log level set in the application configuration.
Adheres roughly to env_logger
syntax, see here:
https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives
Implementations§
source§impl Env
impl Env
sourcepub fn is_set(&self) -> bool
pub fn is_set(&self) -> bool
Returns true if an environment variable is defined and set to an arbitrary value.
sourcepub fn get_raw(&self) -> Option<OsString>
pub fn get_raw(&self) -> Option<OsString>
Get the raw value of an environment variable. Refer to std::env::var_os for what a value
of None
may mean.