Struct conch_runtime::env::VirtualWorkingDirEnv
[−]
[src]
pub struct VirtualWorkingDirEnv { /* fields omitted */ }An environment module for keeping track of the current working directory.
This is a "virtual" implementation because changing the working directory through this environment will not affect the working directory of the entire process.
Uses Rc internally. For a possible Send and Sync implementation,
see env::atomic::VirtualWorkingDirEnv.
Methods
impl VirtualWorkingDirEnv[src]
fn new<P: AsRef<Path>>(path: P) -> Result<Self>[src]
Constructs a new environment with a provided working directory.
The specified path must be an absolute path or an error will result.
fn with_path_buf(path: PathBuf) -> Result<Self>[src]
Constructs a new environment with a provided PathBuf as a working directory.
The specified path must be an absolute path or an error will result.
fn with_process_working_dir() -> Result<Self>[src]
Constructs a new environment and initializes it with the current working directory of the current process.
Trait Implementations
impl Debug for VirtualWorkingDirEnv[src]
impl Clone for VirtualWorkingDirEnv[src]
fn clone(&self) -> VirtualWorkingDirEnv[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl PartialEq for VirtualWorkingDirEnv[src]
fn eq(&self, __arg_0: &VirtualWorkingDirEnv) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &VirtualWorkingDirEnv) -> bool[src]
This method tests for !=.
impl Eq for VirtualWorkingDirEnv[src]
impl WorkingDirectoryEnvironment for VirtualWorkingDirEnv[src]
fn path_relative_to_working_dir<'a>(&self, path: Cow<'a, Path>) -> Cow<'a, Path>[src]
Converts the specified path to one relative to the environment's working directory.
fn current_working_dir(&self) -> &Path[src]
Retrieves the current working directory of this environment.
impl ChangeWorkingDirectoryEnvironment for VirtualWorkingDirEnv[src]
fn change_working_dir<'a>(&mut self, path: Cow<'a, Path>) -> Result<()>[src]
Changes the environment's current working directory to the following path. Read more