#[non_exhaustive]pub enum SagaCommandProcessingError {
ProducerUnauthorized,
IdentityInvalid,
RouteUnauthorized,
ContractInvalid,
}Expand description
业务作用:用封闭类型标记 Saga command 的不可恢复投递错误。
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.
transport 认证出的 producer 不在参与方信任投影中。
IdentityInvalid
envelope 身份、派生身份或编码不合法。
command route 无权承载目标 workflow 步骤。
ContractInvalid
phase、取消能力或 payload 违反已发布步骤合同。
Implementations§
Source§impl SagaCommandProcessingError
impl SagaCommandProcessingError
Sourcepub const fn dead_letter_reason(self) -> &'static str
pub const fn dead_letter_reason(self) -> &'static str
业务作用:返回可安全写入 DLT header 的稳定原因码。
参数说明: 无。
返回:不含 envelope、payload 或底层错误的低基数原因码。
Sourcepub fn from_dead_letter_reason(reason: &str) -> Option<Self>
pub fn from_dead_letter_reason(reason: &str) -> Option<Self>
业务作用:把未受信原因码收窄为封闭 command 错误。
参数说明:reason 是 connector 收到的候选原因码。
返回:精确命中白名单时返回对应类型;未知文本返回 None。
Trait Implementations§
Source§impl Clone for SagaCommandProcessingError
impl Clone for SagaCommandProcessingError
impl Copy for SagaCommandProcessingError
Source§impl Debug for SagaCommandProcessingError
impl Debug for SagaCommandProcessingError
Source§impl Display for SagaCommandProcessingError
impl Display for SagaCommandProcessingError
impl Eq for SagaCommandProcessingError
Source§impl Error for SagaCommandProcessingError
impl Error for SagaCommandProcessingError
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()
impl StructuralPartialEq for SagaCommandProcessingError
Auto Trait Implementations§
impl Freeze for SagaCommandProcessingError
impl RefUnwindSafe for SagaCommandProcessingError
impl Send for SagaCommandProcessingError
impl Sync for SagaCommandProcessingError
impl Unpin for SagaCommandProcessingError
impl UnsafeUnpin for SagaCommandProcessingError
impl UnwindSafe for SagaCommandProcessingError
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