pub enum TransactionUpdate {
Applied {
nodes_written: usize,
roots_written: usize,
},
Conflict(Box<TransactionConflict>),
}Expand description
Result of committing a transaction.
Variants§
Applied
All staged writes were committed atomically.
Fields
Conflict(Box<TransactionConflict>)
A named-root condition failed; no staged writes were applied.
Implementations§
Source§impl TransactionUpdate
impl TransactionUpdate
Sourcepub fn is_applied(&self) -> bool
pub fn is_applied(&self) -> bool
Whether the transaction committed.
Sourcepub fn is_conflict(&self) -> bool
pub fn is_conflict(&self) -> bool
Whether the transaction failed validation.
Sourcepub fn conflict(&self) -> Option<&TransactionConflict>
pub fn conflict(&self) -> Option<&TransactionConflict>
Conflict details, if validation failed.
Trait Implementations§
Source§impl Clone for TransactionUpdate
impl Clone for TransactionUpdate
Source§fn clone(&self) -> TransactionUpdate
fn clone(&self) -> TransactionUpdate
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TransactionUpdate
impl Debug for TransactionUpdate
Source§impl PartialEq for TransactionUpdate
impl PartialEq for TransactionUpdate
impl StructuralPartialEq for TransactionUpdate
Auto Trait Implementations§
impl Freeze for TransactionUpdate
impl RefUnwindSafe for TransactionUpdate
impl Send for TransactionUpdate
impl Sync for TransactionUpdate
impl Unpin for TransactionUpdate
impl UnsafeUnpin for TransactionUpdate
impl UnwindSafe for TransactionUpdate
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more