#[repr(i32)]pub enum ErrorReason {
Show 24 variants
Unspecified = 0,
CredentialMissing = 100,
CredentialExpired = 101,
CredentialRevoked = 102,
ProofInvalid = 103,
ScopeMissing = 200,
RoleInsufficient = 201,
PolicyDenied = 202,
PlanLimit = 203,
ResourceNotFound = 300,
ResourceGone = 301,
FieldInvalid = 400,
FieldRequired = 401,
ChangeIdAmbiguous = 402,
LifecycleState = 500,
OperationIdReused = 501,
VersionConflict = 502,
AlreadyExists = 503,
RateLimited = 600,
QuotaExceeded = 601,
CursorInvalid = 602,
Transient = 900,
Internal = 901,
Unimplemented = 902,
}Variants§
Unspecified = 0
CredentialMissing = 100
Authentication (1xx)
CredentialExpired = 101
CredentialRevoked = 102
ProofInvalid = 103
ScopeMissing = 200
Authorization (2xx)
RoleInsufficient = 201
PolicyDenied = 202
PlanLimit = 203
ResourceNotFound = 300
Existence (3xx)
ResourceGone = 301
FieldInvalid = 400
Request validity (4xx)
FieldRequired = 401
ChangeIdAmbiguous = 402
LifecycleState = 500
Preconditions & conflicts (5xx)
OperationIdReused = 501
VersionConflict = 502
AlreadyExists = 503
RateLimited = 600
Flow control (6xx). RATE_LIMITED / QUOTA_EXCEEDED are retryable; CURSOR_INVALID is a client-fix (restart from a valid cursor), not retryable.
QuotaExceeded = 601
CursorInvalid = 602
Transient = 900
Server (9xx)
Internal = 901
Unimplemented = 902
Implementations§
Source§impl ErrorReason
impl ErrorReason
Source§impl ErrorReason
impl ErrorReason
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for ErrorReason
impl Clone for ErrorReason
Source§fn clone(&self) -> ErrorReason
fn clone(&self) -> ErrorReason
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ErrorReason
Source§impl Debug for ErrorReason
impl Debug for ErrorReason
Source§impl Default for ErrorReason
impl Default for ErrorReason
Source§fn default() -> ErrorReason
fn default() -> ErrorReason
Returns the “default value” for a type. Read more
impl Eq for ErrorReason
Source§impl From<ErrorReason> for i32
impl From<ErrorReason> for i32
Source§fn from(value: ErrorReason) -> i32
fn from(value: ErrorReason) -> i32
Converts to this type from the input type.
Source§impl Hash for ErrorReason
impl Hash for ErrorReason
Source§impl Ord for ErrorReason
impl Ord for ErrorReason
Source§fn cmp(&self, other: &ErrorReason) -> Ordering
fn cmp(&self, other: &ErrorReason) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ErrorReason
impl PartialEq for ErrorReason
Source§impl PartialOrd for ErrorReason
impl PartialOrd for ErrorReason
impl StructuralPartialEq for ErrorReason
Source§impl TryFrom<i32> for ErrorReason
impl TryFrom<i32> for ErrorReason
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
The type returned in the event of a conversion error.
Source§fn try_from(value: i32) -> Result<ErrorReason, UnknownEnumValue>
fn try_from(value: i32) -> Result<ErrorReason, UnknownEnumValue>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for ErrorReason
impl RefUnwindSafe for ErrorReason
impl Send for ErrorReason
impl Sync for ErrorReason
impl Unpin for ErrorReason
impl UnsafeUnpin for ErrorReason
impl UnwindSafe for ErrorReason
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