pub trait Env {
// Required methods
fn home_dir(&self) -> Option<PathBuf>;
fn current_dir(&self) -> Result<PathBuf>;
fn var_os(&self, key: &str) -> Option<OsString>;
}
Expand description
Permits parameterizing the home functions via the _from variants - used for in-process unit testing by rustup.
Required Methods§
sourcefn home_dir(&self) -> Option<PathBuf>
fn home_dir(&self) -> Option<PathBuf>
Return the path to the users home dir, or None if any error occurs: see home_inner.
sourcefn current_dir(&self) -> Result<PathBuf>
fn current_dir(&self) -> Result<PathBuf>
Return the current working directory.