#[non_exhaustive]pub enum SagaConcurrencyError {
StaleSnapshot,
DuplicateTrigger,
}Expand description
业务作用:保留状态迁移 CAS 未生效的确定性并发裁决,禁止协议层解析错误文本。
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
Source§impl SagaConcurrencyError
impl SagaConcurrencyError
Sourcepub fn from_error(error: &Error) -> Option<Self>
pub fn from_error(error: &Error) -> Option<Self>
业务作用:从事务与调用上下文包裹的错误链中提取 CAS 并发裁决。
参数说明:
error:是状态迁移调用返回的完整错误链。
返回:包含确定性并发裁决时返回对应类别;其它失败返回 None。
Trait Implementations§
Source§impl Clone for SagaConcurrencyError
impl Clone for SagaConcurrencyError
impl Copy for SagaConcurrencyError
Source§impl Debug for SagaConcurrencyError
impl Debug for SagaConcurrencyError
Source§impl Display for SagaConcurrencyError
impl Display for SagaConcurrencyError
impl Eq for SagaConcurrencyError
Source§impl Error for SagaConcurrencyError
impl Error for SagaConcurrencyError
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 PartialEq for SagaConcurrencyError
impl PartialEq for SagaConcurrencyError
impl StructuralPartialEq for SagaConcurrencyError
Auto Trait Implementations§
impl Forget for SagaConcurrencyError
impl Freeze for SagaConcurrencyError
impl Move for SagaConcurrencyError
impl RefUnwindSafe for SagaConcurrencyError
impl Send for SagaConcurrencyError
impl Sync for SagaConcurrencyError
impl Unpin for SagaConcurrencyError
impl UnsafeUnpin for SagaConcurrencyError
impl UnwindSafe for SagaConcurrencyError
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