Struct current_dir::Cwd
source · pub struct Cwd { /* private fields */ }Expand description
Wrapper type to help the usage of the current working directory for the process.
Implementations§
source§impl Cwd
impl Cwd
sourcepub fn mutex() -> &'static Mutex<Self>
pub fn mutex() -> &'static Mutex<Self>
The Mutex ensuring the state of the current working directory.
It is a logic error to call env::set_current_dir() or env::current_dir() without this lock acquired.
sourcepub fn get_expected(&self) -> Option<PathBuf>
pub fn get_expected(&self) -> Option<PathBuf>
Returns the expected current working directory if any. By default the only expectations set are when this crate produces a panic.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Cwd
impl !RefUnwindSafe for Cwd
impl Send for Cwd
impl !Sync for Cwd
impl Unpin for Cwd
impl UnwindSafe for Cwd
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more