Struct widerwlock::ReadGuard
source · pub struct ReadGuard<'a, T: ?Sized + 'a> { /* private fields */ }
Expand description
Returned from the read()
method and grants read-only access to the enclosed data
Implementations
sourceimpl<'a, T: ?Sized + 'a> ReadGuard<'a, T>
impl<'a, T: ?Sized + 'a> ReadGuard<'a, T>
sourcepub fn upgrade_to_write_lock(self) -> UpgradeResult<'a, T>
pub fn upgrade_to_write_lock(self) -> UpgradeResult<'a, T>
Upgrade a read lock to a write lock. If the upgrade happened atomically (no other writers took the lock in the meantime), the return type indicates that.
Trait Implementations
Auto Trait Implementations
impl<'a, T> !RefUnwindSafe for ReadGuard<'a, T>
impl<'a, T: ?Sized> Send for ReadGuard<'a, T>where
T: Send + Sync,
impl<'a, T: ?Sized> Sync for ReadGuard<'a, T>where
T: Send + Sync,
impl<'a, T: ?Sized> Unpin for ReadGuard<'a, T>
impl<'a, T> !UnwindSafe for ReadGuard<'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