Struct conch_runtime::env::atomic::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 Arc internally. If Send and Sync is not required of the implementation,
see env::VirtualWorkingDirEnv as a cheaper alternative.
Methods
impl AtomicVirtualWorkingDirEnv[src]
impl AtomicVirtualWorkingDirEnvpub fn new<P: AsRef<Path>>(path: P) -> Result<Self>[src]
pub fn new<P: AsRef<Path>>(path: P) -> Result<Self>Constructs a new environment with a provided working directory.
The specified path must be an absolute path or an error will result.
pub fn with_path_buf(path: PathBuf) -> Result<Self>[src]
pub fn with_path_buf(path: PathBuf) -> Result<Self>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.
pub fn with_process_working_dir() -> Result<Self>[src]
pub fn with_process_working_dir() -> Result<Self>Constructs a new environment and initializes it with the current working directory of the current process.
Trait Implementations
impl Debug for AtomicVirtualWorkingDirEnv[src]
impl Debug for AtomicVirtualWorkingDirEnvfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Clone for AtomicVirtualWorkingDirEnv[src]
impl Clone for AtomicVirtualWorkingDirEnvfn clone(&self) -> AtomicVirtualWorkingDirEnv[src]
fn clone(&self) -> AtomicVirtualWorkingDirEnvReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl PartialEq for AtomicVirtualWorkingDirEnv[src]
impl PartialEq for AtomicVirtualWorkingDirEnvfn eq(&self, other: &AtomicVirtualWorkingDirEnv) -> bool[src]
fn eq(&self, other: &AtomicVirtualWorkingDirEnv) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &AtomicVirtualWorkingDirEnv) -> bool[src]
fn ne(&self, other: &AtomicVirtualWorkingDirEnv) -> boolThis method tests for !=.
impl Eq for AtomicVirtualWorkingDirEnv[src]
impl Eq for AtomicVirtualWorkingDirEnvimpl WorkingDirectoryEnvironment for AtomicVirtualWorkingDirEnv[src]
impl WorkingDirectoryEnvironment for AtomicVirtualWorkingDirEnvfn path_relative_to_working_dir<'a>(&self, path: Cow<'a, Path>) -> Cow<'a, Path>[src]
fn path_relative_to_working_dir<'a>(&self, path: Cow<'a, Path>) -> Cow<'a, Path>Converts the specified path to one relative to the environment's working directory.
fn current_working_dir(&self) -> &Path[src]
fn current_working_dir(&self) -> &PathRetrieves the current working directory of this environment.
impl ChangeWorkingDirectoryEnvironment for AtomicVirtualWorkingDirEnv[src]
impl ChangeWorkingDirectoryEnvironment for AtomicVirtualWorkingDirEnvfn change_working_dir<'a>(&mut self, path: Cow<'a, Path>) -> Result<()>[src]
fn change_working_dir<'a>(&mut self, path: Cow<'a, Path>) -> Result<()>Changes the environment's current working directory to the following path. Read more
impl SubEnvironment for AtomicVirtualWorkingDirEnv[src]
impl SubEnvironment for AtomicVirtualWorkingDirEnvAuto Trait Implementations
impl Send for AtomicVirtualWorkingDirEnv
impl Send for AtomicVirtualWorkingDirEnvimpl Sync for AtomicVirtualWorkingDirEnv
impl Sync for AtomicVirtualWorkingDirEnv