Struct cros_asyncv2::sync::spin::SpinLockGuard
source · [−]Expand description
An RAII implementation of a “scoped lock” for a SpinLock
. When this structure is dropped, the
lock will be released. The resource protected by the SpinLock
can be accessed via the Deref
and DerefMut
implementations of this structure.
Fields
lock: &'a SpinLock<T>
value: &'a mut T
Trait Implementations
sourceimpl<'a, T: ?Sized> Deref for SpinLockGuard<'a, T>
impl<'a, T: ?Sized> Deref for SpinLockGuard<'a, T>
sourceimpl<'a, T: ?Sized> DerefMut for SpinLockGuard<'a, T>
impl<'a, T: ?Sized> DerefMut for SpinLockGuard<'a, T>
Auto Trait Implementations
impl<'a, T> !RefUnwindSafe for SpinLockGuard<'a, T>
impl<'a, T: ?Sized> Send for SpinLockGuard<'a, T>where
T: Send,
impl<'a, T: ?Sized> Sync for SpinLockGuard<'a, T>where
T: Send + Sync,
impl<'a, T: ?Sized> Unpin for SpinLockGuard<'a, T>
impl<'a, T> !UnwindSafe for SpinLockGuard<'a, T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more