Struct mvcc_cell::Transaction

source ·
pub struct Transaction<'a> { /* private fields */ }
Expand description

A mutable snapshot of the controlled MvccCells. Created via Mvcc::begin().

Implementations§

Store a new value inside the cell.

Returns the old value iff it was previously written by this transaction

Reverts this cell to its value at the beginning of the transaction.

Returns the pending value, if any.

Get the value of this cell as of the start of the transaction

Attempt to commit changes

Returns Err(self) if any MvccCell seen by this transaction has committed changes since begin() was called.

Checks to see if there are any conflicts preventing this transaction from committing.

Note that, because of TOCTOU, try_commit may still fail after this returns true.

Trait Implementations§

The returned type after indexing.
Performs the indexing (container[index]) operation. Read more
Performs the mutable indexing (container[index]) operation. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.