Struct left_right_cell::ReadHandle
source · [−]pub struct ReadHandle<T>(_);Expand description
A handle to the read half of the cell. Getting a value from the read handle will never block.
Implementations
sourceimpl<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.
Auto Trait Implementations
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
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