pub struct WeakReadLock<T: ?Sized>(/* private fields */);
Expand description
A weak read-only reference to a resource possibly shared with up to one
Shared
and many SharedReadLock
s.
Implementations§
Source§impl<T: ?Sized> WeakReadLock<T>
impl<T: ?Sized> WeakReadLock<T>
Sourcepub fn upgrade(&self) -> Option<SharedReadLock<T>>
pub fn upgrade(&self) -> Option<SharedReadLock<T>>
Attempt to upgrade the WeakReadLock
into a SharedReadLock
, delaying
dropping of the inner value if successful.
Returns None
if the inner value has already been dropped.
Trait Implementations§
Source§impl<T: ?Sized> Clone for WeakReadLock<T>
impl<T: ?Sized> Clone for WeakReadLock<T>
Auto Trait Implementations§
impl<T> Freeze for WeakReadLock<T>where
T: ?Sized,
impl<T> RefUnwindSafe for WeakReadLock<T>where
T: ?Sized,
impl<T> Send for WeakReadLock<T>
impl<T> Sync for WeakReadLock<T>
impl<T> Unpin for WeakReadLock<T>where
T: ?Sized,
impl<T> UnwindSafe for WeakReadLock<T>where
T: ?Sized,
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