pub struct Transaction { /* private fields */ }
Expand description

Represents an in-memory transaction, keeping a mutable state of the changes. When you “commit” this transaction, you return the collection of values which need to be written to the storage layer including all mutations. Rollback simply empties the transaction state.

Implementations

Instantiate a new transaction instance

Log metrics about the current transaction instance. Metrics will be cleared after log call

Start a transaction in the storage layer

Commit a transaction in the storage layer

Rollback a transaction

Retrieve a flag determining if there is a transaction active

Hit test the current transaction to see if it is currently active

Set a value in the transaction to be committed at transaction commit time

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. 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.

Should always be Self

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.