pub struct EnvVarGuard { /* private fields */ }Expand description
Mutates an environment variable for the duration of the guard, restoring the original state on drop.
EnvVarGuard::set: ensures the variable is SET to a valueEnvVarGuard::removed: ensures the variable is UNSET
Implementations§
Trait Implementations§
Source§impl Drop for EnvVarGuard
impl Drop for EnvVarGuard
Auto Trait Implementations§
impl Forget for EnvVarGuard
impl Freeze for EnvVarGuard
impl RefUnwindSafe for EnvVarGuard
impl Send for EnvVarGuard
impl Sync for EnvVarGuard
impl Unpin for EnvVarGuard
impl UnsafeUnpin for EnvVarGuard
impl UnwindSafe for EnvVarGuard
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