#[non_exhaustive]pub enum SagaManagementError {
InvalidContext,
PermissionDenied,
NotFound,
RateLimitExceeded,
PreconditionFailed,
OperationConflict,
}Expand description
业务作用:封闭管理上下文、查询与写动作的确定性拒绝,供协议层稳定映射状态。
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.
InvalidContext
调用主体、原因或其它审计上下文不符合持久化边界。
PermissionDenied
已认证主体缺少当前动作的最小权限。
NotFound
目标实例不存在或不属于已授权租户。
RateLimitExceeded
当前租户的管理动作窗口预算已耗尽。
PreconditionFailed
实例状态、控制态、恢复证据或 CAS 快照不允许当前动作。
OperationConflict
稳定管理操作身份已绑定另一份动作或审计事实。
Implementations§
Source§impl SagaManagementError
impl SagaManagementError
Sourcepub fn from_error(error: &Error) -> Option<Self>
pub fn from_error(error: &Error) -> Option<Self>
业务作用:从可能附加事务上下文的错误链提取可公开管理拒绝类别。
参数说明:
error:是管理查询或动作返回的完整错误链。
返回:命中管理拒绝或后端唯一身份冲突时返回对应类别;基础设施或未知失败返回 None。
Trait Implementations§
Source§impl Clone for SagaManagementError
impl Clone for SagaManagementError
impl Copy for SagaManagementError
Source§impl Debug for SagaManagementError
impl Debug for SagaManagementError
Source§impl Display for SagaManagementError
impl Display for SagaManagementError
impl Eq for SagaManagementError
Source§impl Error for SagaManagementError
impl Error for SagaManagementError
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 SagaManagementError
impl PartialEq for SagaManagementError
impl StructuralPartialEq for SagaManagementError
Auto Trait Implementations§
impl Forget for SagaManagementError
impl Freeze for SagaManagementError
impl Move for SagaManagementError
impl RefUnwindSafe for SagaManagementError
impl Send for SagaManagementError
impl Sync for SagaManagementError
impl Unpin for SagaManagementError
impl UnsafeUnpin for SagaManagementError
impl UnwindSafe for SagaManagementError
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