[−][src]Struct concread::cowcell::CowCellWriteTxn
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
impl<'a, T> CowCellWriteTxn<'a, T> where
T: Clone,
[src]
T: Clone,
pub fn get_mut(&mut self) -> &mut T
[src]
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()
.
pub fn commit(self)
[src]
Commit the changes made in this write transactions to the CowCell
.
This will consume the transaction so no further changes can be made
after this is called. Not calling this in a block, is equivalent to
an abort/rollback of the transaction.
Trait Implementations
impl<'a, T> Deref for CowCellWriteTxn<'a, T>
[src]
impl<'a, T> DerefMut for CowCellWriteTxn<'a, T>
[src]
Auto Trait Implementations
impl<'a, T> !RefUnwindSafe for CowCellWriteTxn<'a, T>
impl<'a, T> !Send for CowCellWriteTxn<'a, T>
impl<'a, T> Sync for CowCellWriteTxn<'a, T> where
T: Send + Sync,
T: Send + Sync,
impl<'a, T> Unpin for CowCellWriteTxn<'a, T> where
T: Unpin,
T: Unpin,
impl<'a, T> !UnwindSafe for CowCellWriteTxn<'a, T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,