pub struct VariableValue(/* private fields */);Expand description
The value of an environment variable of an external command
The value holds what the program reads, as the caller wrote it. Nothing
splits it at a space or expands a character such as $, because no shell
reads the command. A value that holds a space is one value.
The value is an OsString, because the environment of a program holds
the strings of the operating system and not the strings of Rust. A value is
often a path, such as the directory that a build tool writes to, and a
path becomes a value without a conversion of its own.
§Examples
use kawauso_process::invocation::VariableValue;
let value = VariableValue::from("-D warnings");
assert_eq!(value.get(), "-D warnings");Implementations§
Trait Implementations§
Source§impl Clone for VariableValue
impl Clone for VariableValue
Source§fn clone(&self) -> VariableValue
fn clone(&self) -> VariableValue
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VariableValue
impl Debug for VariableValue
Source§impl Display for VariableValue
Shows the value for a reader
impl Display for VariableValue
Shows the value for a reader
A value that is not valid UTF-8 shows the replacement character U+FFFD
for each byte that has no character. The text is for a person, and no
caller reads it back into a value.
impl Eq for VariableValue
Source§impl From<&OsStr> for VariableValue
Creates a value from a borrowed string of the operating system
impl From<&OsStr> for VariableValue
Creates a value from a borrowed string of the operating system
Source§impl From<&Path> for VariableValue
Creates a value from a borrowed path, such as the root of a project
impl From<&Path> for VariableValue
Creates a value from a borrowed path, such as the root of a project
Source§impl From<&str> for VariableValue
Creates a value from a borrowed string, such as a literal
impl From<&str> for VariableValue
Creates a value from a borrowed string, such as a literal
Source§impl From<OsString> for VariableValue
Creates a value from a string of the operating system
impl From<OsString> for VariableValue
Creates a value from a string of the operating system
Source§impl From<PathBuf> for VariableValue
Creates a value from a path that the application built at runtime
impl From<PathBuf> for VariableValue
Creates a value from a path that the application built at runtime
Source§impl From<String> for VariableValue
Creates a value from a string that the application built at runtime
impl From<String> for VariableValue
Creates a value from a string that the application built at runtime