pub struct Held<'a, T> { /* private fields */ }Expand description
The lock, held.
Derefs to the value, and gives it back when it is dropped. It cannot be sent to another thread, because the thread that took a lock is the thread that has to release it.
Trait Implementations§
impl<T: Sync> Sync for Held<'_, T>
Auto Trait Implementations§
impl<'a, T> !RefUnwindSafe for Held<'a, T>
impl<'a, T> !Send for Held<'a, T>
impl<'a, T> !UnwindSafe for Held<'a, T>
impl<'a, T> Freeze for Held<'a, T>
impl<'a, T> Unpin for Held<'a, T>
impl<'a, T> UnsafeUnpin for Held<'a, T>where
&'a Lock<T>: UnsafeUnpin,
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