Struct concread::cowcell::asynch::CowCellWriteTxn
source · pub struct CowCellWriteTxn<'a, T> { /* private fields */ }
Expand description
A CowCell
Write Transaction handle.
This allows mutation of the content of the CowCell
without blocking or
affecting current readers.
Changes are only stored in this structure until you call commit. To abort/
rollback a change, don’t call commit and allow the write transaction to
be dropped. This causes the CowCell
to unlock allowing the next writer
to proceed.
Implementations§
source§impl<T> CowCellWriteTxn<'_, T>where
T: Clone,
impl<T> CowCellWriteTxn<'_, T>where
T: Clone,
sourcepub fn get_mut(&mut self) -> &mut T
pub fn get_mut(&mut self) -> &mut T
Access a mutable pointer of the data in the CowCell
. This data is only
visible to the write transaction object in this thread, until you call
commit()
.
Trait Implementations§
source§impl<T> Deref for CowCellWriteTxn<'_, T>where
T: Clone,
impl<T> Deref for CowCellWriteTxn<'_, T>where
T: Clone,
Auto Trait Implementations§
impl<'a, T> Freeze for CowCellWriteTxn<'a, T>where
T: Freeze,
impl<'a, T> !RefUnwindSafe for CowCellWriteTxn<'a, T>
impl<'a, T> Send for CowCellWriteTxn<'a, T>
impl<'a, T> Sync for CowCellWriteTxn<'a, T>
impl<'a, T> Unpin for CowCellWriteTxn<'a, T>where
T: Unpin,
impl<'a, T> !UnwindSafe for CowCellWriteTxn<'a, T>
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, A> DynAccess<T> for A
impl<T, A> DynAccess<T> for A
source§fn load(&self) -> DynGuard<T>
fn load(&self) -> DynGuard<T>
The equivalent of
Access::load
.