pub(crate) enum RwLockEitherGuard<'a, T> {
Read(OwnedRwLockReadGuard<T>),
Write(&'a OwnedRwLockWriteGuard<T>),
}Expand description
Either an owned read guard or a borrowed write guard on an OwnedRwLock.
The guards are only held, never accessed.
Variants§
Read(OwnedRwLockReadGuard<T>)
Owned read guard.
Write(&'a OwnedRwLockWriteGuard<T>)
Borrowed write guard.
Trait Implementations§
Source§impl<'a, T: Debug> Debug for RwLockEitherGuard<'a, T>
impl<'a, T: Debug> Debug for RwLockEitherGuard<'a, T>
Source§impl<'a, T> From<&'a OwnedRwLockWriteGuard<T>> for RwLockEitherGuard<'a, T>
impl<'a, T> From<&'a OwnedRwLockWriteGuard<T>> for RwLockEitherGuard<'a, T>
Source§fn from(guard: &'a OwnedRwLockWriteGuard<T>) -> Self
fn from(guard: &'a OwnedRwLockWriteGuard<T>) -> Self
Converts to this type from the input type.
Source§impl<T> From<OwnedRwLockReadGuard<T>> for RwLockEitherGuard<'_, T>
impl<T> From<OwnedRwLockReadGuard<T>> for RwLockEitherGuard<'_, T>
Source§fn from(guard: OwnedRwLockReadGuard<T>) -> Self
fn from(guard: OwnedRwLockReadGuard<T>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a, T> Freeze for RwLockEitherGuard<'a, T>
impl<'a, T> !RefUnwindSafe for RwLockEitherGuard<'a, T>
impl<'a, T> Send for RwLockEitherGuard<'a, T>
impl<'a, T> Sync for RwLockEitherGuard<'a, T>
impl<'a, T> Unpin for RwLockEitherGuard<'a, T>where
T: Unpin,
impl<'a, T> UnsafeUnpin for RwLockEitherGuard<'a, T>
impl<'a, T> !UnwindSafe for RwLockEitherGuard<'a, T>
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