[][src]Struct concread::cowcell::CowCellWriteTxn

pub struct CowCellWriteTxn<'a, T: 'a> { /* fields omitted */ }

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]

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]

type Target = T

The resulting type after dereferencing.

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

impl<'a, T> Unpin for CowCellWriteTxn<'a, T> where
    T: Unpin

impl<'a, T> !UnwindSafe for CowCellWriteTxn<'a, T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.