pub enum ConflictableTransactionError<T = Error> {
Abort(T),
Storage(Error),
// some variants omitted
}
Expand description
An error type that is returned from the closure
passed to the transaction
method.
Variants§
Abort(T)
A user-provided error type that indicates the transaction should abort.
This is passed into the return value of transaction
as a direct Err
instance, rather than forcing users to interact with this enum
directly.
Storage(Error)
A serious underlying storage issue has occurred that requires attention from an operator or a remediating system, such as corruption.
Trait Implementations§
source§impl<T: Clone> Clone for ConflictableTransactionError<T>
impl<T: Clone> Clone for ConflictableTransactionError<T>
source§fn clone(&self) -> ConflictableTransactionError<T>
fn clone(&self) -> ConflictableTransactionError<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<T: Debug> Debug for ConflictableTransactionError<T>
impl<T: Debug> Debug for ConflictableTransactionError<T>
source§impl<E: Display> Display for ConflictableTransactionError<E>
impl<E: Display> Display for ConflictableTransactionError<E>
source§impl<E: Error> Error for ConflictableTransactionError<E>
impl<E: Error> Error for ConflictableTransactionError<E>
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl<T> From<Error> for ConflictableTransactionError<T>
impl<T> From<Error> for ConflictableTransactionError<T>
source§impl<E> From<UnabortableTransactionError> for ConflictableTransactionError<E>
impl<E> From<UnabortableTransactionError> for ConflictableTransactionError<E>
source§fn from(error: UnabortableTransactionError) -> Self
fn from(error: UnabortableTransactionError) -> Self
Converts to this type from the input type.
source§impl<T: PartialEq> PartialEq<ConflictableTransactionError<T>> for ConflictableTransactionError<T>
impl<T: PartialEq> PartialEq<ConflictableTransactionError<T>> for ConflictableTransactionError<T>
source§fn eq(&self, other: &ConflictableTransactionError<T>) -> bool
fn eq(&self, other: &ConflictableTransactionError<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<T> StructuralPartialEq for ConflictableTransactionError<T>
Auto Trait Implementations§
impl<T = Error> !RefUnwindSafe for ConflictableTransactionError<T>
impl<T> Send for ConflictableTransactionError<T>where T: Send,
impl<T> Sync for ConflictableTransactionError<T>where T: Sync,
impl<T> Unpin for ConflictableTransactionError<T>where T: Unpin,
impl<T = Error> !UnwindSafe for ConflictableTransactionError<T>
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