pub struct QrwCell<T> { /* private fields */ }
Expand description
A quick read-write cell.
Implementations§
Source§impl<T> QrwCell<T>
impl<T> QrwCell<T>
Sourcepub fn with_value(value: T) -> Self
pub fn with_value(value: T) -> Self
Create a new cell with a value.
Sourcepub fn get(&self) -> Arc<T>
pub fn get(&self) -> Arc<T>
Get the current value of the cell.
This function will panic if the cell is in an uninitialized state.
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for QrwCell<T>
impl<T> !RefUnwindSafe for QrwCell<T>
impl<T> Send for QrwCell<T>
impl<T> Sync for QrwCell<T>
impl<T> Unpin for QrwCell<T>
impl<T> UnwindSafe for QrwCell<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