pub struct ReadHandle<T>(/* private fields */);
Expand description
A handle to the read half of the cell. Getting a value from the read handle will never block.
Implementations§
Source§impl<T> ReadHandle<T>
impl<T> ReadHandle<T>
Sourcepub fn get(&self) -> Option<ReadGuard<'_, T>>
pub fn get(&self) -> Option<ReadGuard<'_, T>>
Gets the value from the cell. Returns None
if the WriteHandle
as been dropped.
Sourcepub unsafe fn get_unchecked(&self) -> ReadGuard<'_, T>
pub unsafe fn get_unchecked(&self) -> ReadGuard<'_, T>
§Safety
The user of this function must be sure that the WriteHandle
has not been dropped.
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for ReadHandle<T>
impl<T> !RefUnwindSafe for ReadHandle<T>
impl<T> Send for ReadHandle<T>where
T: Sync,
impl<T> !Sync for ReadHandle<T>
impl<T> Unpin for ReadHandle<T>
impl<T> UnwindSafe for ReadHandle<T>where
T: RefUnwindSafe,
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