Enum sled::transaction::TransactionError
source · pub enum TransactionError<T = Error> {
Abort(T),
Storage(Error),
}
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 TransactionError<T>
impl<T: Clone> Clone for TransactionError<T>
source§fn clone(&self) -> TransactionError<T>
fn clone(&self) -> TransactionError<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 TransactionError<T>
impl<T: Debug> Debug for TransactionError<T>
source§impl<E: Display> Display for TransactionError<E>
impl<E: Display> Display for TransactionError<E>
source§impl<E: Error> Error for TransactionError<E>
impl<E: Error> Error for TransactionError<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 TransactionError<T>
impl<T> From<Error> for TransactionError<T>
source§impl<T: PartialEq> PartialEq<TransactionError<T>> for TransactionError<T>
impl<T: PartialEq> PartialEq<TransactionError<T>> for TransactionError<T>
source§fn eq(&self, other: &TransactionError<T>) -> bool
fn eq(&self, other: &TransactionError<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<T> StructuralPartialEq for TransactionError<T>
Auto Trait Implementations§
impl<T = Error> !RefUnwindSafe for TransactionError<T>
impl<T> Send for TransactionError<T>where T: Send,
impl<T> Sync for TransactionError<T>where T: Sync,
impl<T> Unpin for TransactionError<T>where T: Unpin,
impl<T = Error> !UnwindSafe for TransactionError<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