pub enum TransactionError<P: PendingManager> {
ReadOnly,
Conflict,
Discard,
LargeTxn,
Manager(P::Error),
}Expand description
Error type for the transaction.
Variants§
ReadOnly
Returned if an update function is called on a read-only transaction.
Conflict
Returned when a transaction conflicts with another transaction. This can happen if the read rows had been updated concurrently by another transaction.
Discard
Returned if a previously discarded transaction is re-used.
LargeTxn
Returned if too many writes are fit into a single transaction.
Manager(P::Error)
Returned if the transaction manager error occurs.
Trait Implementations§
Source§impl<P: PendingManager> Debug for TransactionError<P>
impl<P: PendingManager> Debug for TransactionError<P>
Source§impl<P: PendingManager> Display for TransactionError<P>
impl<P: PendingManager> Display for TransactionError<P>
Source§impl<P: PendingManager> Error for TransactionError<P>
impl<P: PendingManager> Error for TransactionError<P>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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<D: Database, P: PendingManager> From<TransactionError<P>> for Error<D, P>
impl<D: Database, P: PendingManager> From<TransactionError<P>> for Error<D, P>
Source§fn from(source: TransactionError<P>) -> Self
fn from(source: TransactionError<P>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<P> Freeze for TransactionError<P>
impl<P> RefUnwindSafe for TransactionError<P>
impl<P> Send for TransactionError<P>
impl<P> Sync for TransactionError<P>
impl<P> Unpin for TransactionError<P>
impl<P> UnwindSafe for TransactionError<P>
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> 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