Struct readlock::WeakReadLock
source · 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)