pub struct DirSwitch { /* private fields */ }
Expand description
RIIA directory change object.
Creating an instance of this object represents storing the current directory and then switching to the requested directory. Dropping it causes the directory to be switched back to the original directory.
Notes
There’s no ergonomic way to return errors from Drop
handlers. If it is
unable switch back to the original directory, this will be lost to the
application, although an error will be printed on stderr.
Implementations
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for DirSwitch
impl Send for DirSwitch
impl Sync for DirSwitch
impl Unpin for DirSwitch
impl UnwindSafe for DirSwitch
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more