pub enum TransactionError<C, P>{
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§
Source§impl<C, P> TransactionError<C, P>
impl<C, P> TransactionError<C, P>
Sourcepub const fn conflict(err: C) -> TransactionError<C, P>
pub const fn conflict(err: C) -> TransactionError<C, P>
Create a new error from the database error.
Sourcepub const fn pending(err: P) -> TransactionError<C, P>
pub const fn pending(err: P) -> TransactionError<C, P>
Create a new error from the transaction error.
Trait Implementations§
Source§impl<C, P> Clone for TransactionError<C, P>
impl<C, P> Clone for TransactionError<C, P>
Source§fn clone(&self) -> TransactionError<C, P>
fn clone(&self) -> TransactionError<C, P>
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<C, P> Debug for TransactionError<C, P>
impl<C, P> Debug for TransactionError<C, P>
Source§impl<C, P> Display for TransactionError<C, P>
impl<C, P> Display for TransactionError<C, P>
Source§impl<C, P> Error for TransactionError<C, P>
impl<C, P> Error for TransactionError<C, 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<C, P, E> From<TransactionError<C, P>> for WtmError<C, P, E>
impl<C, P, E> From<TransactionError<C, P>> for WtmError<C, P, E>
Source§fn from(err: TransactionError<C, P>) -> WtmError<C, P, E>
fn from(err: TransactionError<C, P>) -> WtmError<C, P, E>
Converts to this type from the input type.
Source§impl<C, P> Hash for TransactionError<C, P>
impl<C, P> Hash for TransactionError<C, P>
Source§impl<C, P> PartialEq for TransactionError<C, P>
impl<C, P> PartialEq for TransactionError<C, P>
impl<C, P> Eq for TransactionError<C, P>
impl<C, P> StructuralPartialEq for TransactionError<C, P>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.