Struct io_providers::NativeEnv [−][src]
pub struct NativeEnv;
Provides inspection and manipulation of the process's environment, using
std::env
.
Trait Implementations
impl Default for NativeEnv
[src]
impl Default for NativeEnv
impl Env for NativeEnv
[src]
impl Env for NativeEnv
type ArgsIter = Args
The iterator type returned by args()
.
type ArgsOsIter = ArgsOs
The iterator type returned by args_os()
.
type VarsIter = Vars
The iterator type returned by vars()
.
type VarsOsIter = VarsOs
The iterator type returned by vars_os()
.
fn args(&self) -> Self::ArgsIter
[src]
fn args(&self) -> Self::ArgsIter
Returns the arguments which this program was started with (normally passed via the command line). Read more
fn args_os(&self) -> Self::ArgsOsIter
[src]
fn args_os(&self) -> Self::ArgsOsIter
Returns the arguments which this program was started with (normally passed via the command line). Read more
fn current_dir(&self) -> Result<PathBuf>
[src]
fn current_dir(&self) -> Result<PathBuf>
Returns the current working directory as a PathBuf
. Read more
fn current_exe(&self) -> Result<PathBuf>
[src]
fn current_exe(&self) -> Result<PathBuf>
Returns the full filesystem path of the current running executable. Read more
fn home_dir(&self) -> Option<PathBuf>
[src]
fn home_dir(&self) -> Option<PathBuf>
: This function's behavior is unexpected and probably not what you want. Consider using the home_dir function from crates.io/crates/dirs instead.
Returns the path of the current user's home directory if known. Read more
fn remove_var<K: AsRef<OsStr>>(&mut self, k: K)
[src]
fn remove_var<K: AsRef<OsStr>>(&mut self, k: K)
Removes an environment variable from the environment of the currently running process. Read more
fn set_current_dir<P: AsRef<Path>>(&mut self, path: P) -> Result<()>
[src]
fn set_current_dir<P: AsRef<Path>>(&mut self, path: P) -> Result<()>
Changes the current working directory to the specified path, returning whether the change was completed successfully or not. Read more
fn set_var<K: AsRef<OsStr>, V: AsRef<OsStr>>(&mut self, k: K, v: V)
[src]
fn set_var<K: AsRef<OsStr>, V: AsRef<OsStr>>(&mut self, k: K, v: V)
Sets the environment variable k
to the value v
for the currently running process. Read more
fn temp_dir(&self) -> PathBuf
[src]
fn temp_dir(&self) -> PathBuf
Returns the path of a temporary directory. Read more
fn var<K: AsRef<OsStr>>(&self, key: K) -> Result<String, VarError>
[src]
fn var<K: AsRef<OsStr>>(&self, key: K) -> Result<String, VarError>
Fetches the environment variable key
from the current process. Read more
fn var_os<K: AsRef<OsStr>>(&self, key: K) -> Option<OsString>
[src]
fn var_os<K: AsRef<OsStr>>(&self, key: K) -> Option<OsString>
Fetches the environment variable key
from the current process. Read more
fn vars(&self) -> Self::VarsIter
[src]
fn vars(&self) -> Self::VarsIter
Returns an iterator of (variable, value) pairs of strings, for all the environment variables of the current process. Read more
fn vars_os(&self) -> Self::VarsOsIter
[src]
fn vars_os(&self) -> Self::VarsOsIter
Returns an iterator of (variable, value) pairs of OS strings, for all the environment variables of the current process. Read more