Skip to main content

ErrorCode

Enum ErrorCode 

Source
#[non_exhaustive]
pub enum ErrorCode {
Show 16 variants InvalidConfig, Unsupported, Unauthenticated, PermissionDenied, PermissionFiltered, Unavailable, RateLimited, DeadlineExceeded, IncompleteSnapshot, InvalidSnapshot, CapacityExceeded, OutcomeUnknown, NoInstances, OwnerClosed, NotReady, Conflict,
}
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.
§

InvalidConfig

配置无效,在外部操作之前拒绝。

§

Unsupported

后端或当前配置不支持所请求的能力。

§

Unauthenticated

身份认证失败,旧身份的证据不能继续授权发送。

§

PermissionDenied

目标作用域的访问被拒绝。

§

PermissionFiltered

服务端按权限过滤了结果,不能视为完整服务快照。

§

Unavailable

后端暂不可用,是否复用旧证据由时效策略裁决。

§

RateLimited

后端拒绝当前请求速率,需要按预算退避。

§

DeadlineExceeded

操作的绝对截止期限已经耗尽。

§

IncompleteSnapshot

响应未能完整同步,不能据此发布新候选;普通读取可以使用尚在宽限内的完整旧证据。

§

InvalidSnapshot

已确认完整候选或对象身份非法,必须立即撤销旧证据,不能按同步失败宽限。

§

CapacityExceeded

本地有限资源或后端响应规模超过容量限制。

§

OutcomeUnknown

外部写入是否生效无法确认,禁止按确定成功继续推进。

§

NoInstances

当前没有可承载请求的服务实例。

§

OwnerClosed

资源 owner 已关闭,不再接纳工作。

§

NotReady

连接或发布资格尚未满足当前操作的前置条件。

§

Conflict

目标已被其他所有者占用或状态与预期不一致。

Trait Implementations§

Source§

impl Clone for ErrorCode

Source§

fn clone(&self) -> ErrorCode

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ErrorCode

Source§

impl Debug for ErrorCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Eq for ErrorCode

Source§

impl PartialEq for ErrorCode

Source§

fn eq(&self, other: &ErrorCode) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ErrorCode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.