Enum txn_core::error::TransactionError
source · pub enum TransactionError<C: Error, P: Error> {
ReadOnly,
Conflict,
Discard,
LargeTxn,
Pwm(P),
Cm(C),
}
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.
Pwm(P)
Returned if the transaction manager error occurs.
Cm(C)
Returned if the conflict manager error occurs.
Implementations§
Trait Implementations§
source§impl<C, P> Display for TransactionError<C, P>
impl<C, P> Display for TransactionError<C, P>
source§impl<C: Error, P: Error> Error for TransactionError<C, P>
impl<C: Error, P: Error> Error for TransactionError<C, P>
1.30.0 · 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()
Auto Trait Implementations§
impl<C, P> Freeze for TransactionError<C, P>
impl<C, P> RefUnwindSafe for TransactionError<C, P>where
P: RefUnwindSafe,
C: RefUnwindSafe,
impl<C, P> Send for TransactionError<C, P>
impl<C, P> Sync for TransactionError<C, P>
impl<C, P> Unpin for TransactionError<C, P>
impl<C, P> UnwindSafe for TransactionError<C, P>where
P: UnwindSafe,
C: UnwindSafe,
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