pub struct Guard<'a, T>(/* private fields */);Expand description
Guards that a referenced ThreadCell becomes properly released when its guard becomes
dropped. This covers releasing threadcells on panic. Guards do not prevent the explicit
release of a ThreadCell. Deref a Guard referencing a released ThreadCell will panic!
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> Freeze for Guard<'a, T>
impl<'a, T> RefUnwindSafe for Guard<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for Guard<'a, T>where
T: Send,
impl<'a, T> Sync for Guard<'a, T>where
T: Send,
impl<'a, T> Unpin for Guard<'a, T>
impl<'a, T> UnwindSafe for Guard<'a, T>where
T: 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