pub enum TxRunError<E> {
Rollback(E),
RollbackOnly {
reason: String,
},
CommitRejected {
reason: String,
},
CommitUncertain {
reason: String,
},
RollbackFailed {
cause: TxRollbackCause<E>,
reason: String,
},
Infrastructure {
reason: String,
},
}Expand description
业务作用:封闭提交、回滚和基础设施失败分类,供消息 ACK 与重试策略裁决。
Variants§
Rollback(E)
业务要求回滚,且数据库确认回滚完成。
RollbackOnly
内层回滚要求被外层吞掉,最外层已确认整体回滚。
CommitRejected
数据库明确拒绝 COMMIT。
CommitUncertain
COMMIT 后连接或协议状态不确定。
RollbackFailed
物理回滚失败。
Infrastructure
在事务开始前或内核执行中发生基础设施错误。
Trait Implementations§
Source§impl<E: Debug> Debug for TxRunError<E>
impl<E: Debug> Debug for TxRunError<E>
Source§impl<E: Display> Display for TxRunError<E>
impl<E: Display> Display for TxRunError<E>
Source§impl<E> Error for TxRunError<E>
impl<E> Error for TxRunError<E>
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()
Auto Trait Implementations§
impl<E> Forget for TxRunError<E>
impl<E> Freeze for TxRunError<E>
impl<E> Move for TxRunError<E>
impl<E> RefUnwindSafe for TxRunError<E>
impl<E> Send for TxRunError<E>
impl<E> Sync for TxRunError<E>
impl<E> Unpin for TxRunError<E>
impl<E> UnsafeUnpin for TxRunError<E>
impl<E> UnwindSafe for TxRunError<E>
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