Struct try_rwlock::ReadGuard
source · [−]pub struct ReadGuard<'lock, T, U = T> { /* private fields */ }
Expand description
A RAII guard that guarantees shared read access to a TryRwLock
.
Implementations
sourceimpl<'lock, T, U> ReadGuard<'lock, T, U>
impl<'lock, T, U> ReadGuard<'lock, T, U>
sourcepub fn rwlock(guard: &Self) -> &'lock TryRwLock<T>
pub fn rwlock(guard: &Self) -> &'lock TryRwLock<T>
Get a shared reference to the lock that this read guard has locked.
sourcepub fn try_upgrade(guard: Self) -> Result<WriteGuard<'lock, T>, Self>
pub fn try_upgrade(guard: Self) -> Result<WriteGuard<'lock, T>, Self>
Trait Implementations
impl<T: Sync, U: Sync> Send for ReadGuard<'_, T, U>
impl<T: Sync, U: Sync> Sync for ReadGuard<'_, T, U>
Auto Trait Implementations
impl<'lock, T, U = T> !RefUnwindSafe for ReadGuard<'lock, T, U>
impl<'lock, T, U> Unpin for ReadGuard<'lock, T, U>
impl<'lock, T, U = T> !UnwindSafe for ReadGuard<'lock, T, U>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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