pub struct ContextGuard<T: TypedContext> { /* private fields */ }Expand description
Guard, created with TypedContext::attach, keeping value as current context.
On drop it will restore previous value.
Trait Implementations§
Source§impl<T: TypedContext> Drop for ContextGuard<T>
impl<T: TypedContext> Drop for ContextGuard<T>
Auto Trait Implementations§
impl<T> Freeze for ContextGuard<T>where
T: Freeze,
impl<T> RefUnwindSafe for ContextGuard<T>where
T: RefUnwindSafe,
impl<T> !Send for ContextGuard<T>
impl<T> !Sync for ContextGuard<T>
impl<T> Unpin for ContextGuard<T>where
T: Unpin,
impl<T> UnwindSafe for ContextGuard<T>where
T: UnwindSafe + RefUnwindSafe,
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