Struct bonsaidb_core::transaction::Transaction
source · [−]Expand description
A list of operations to execute as a single unit. If any operation fails, all changes are aborted. Reads that happen while the transaction is in progress will return old data and not block.
Fields
operations: Vec<Operation>The operations in this transaction.
Implementations
Inserts a new document with contents into collection. If id is
None a unique id will be generated. If an id is provided and a
document already exists with that id, a conflict error will be returned.
Updates a document in collection.
Deletes a document from a collection.
Trait Implementations
Returns the “default value” for a type. Read more
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl UnwindSafe for Transaction
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more