#[non_exhaustive]pub enum ErrorCode {
Show 27 variants
AccessTokenNotFound,
Authn,
BadFrame,
BadHeader,
BadJson,
BadPath,
BadProto,
BadQuery,
BasinDeletionPending,
BasinNotFound,
ClientHangup,
DecryptionFailed,
HotServer,
Invalid,
NotImplemented,
Other,
PermissionDenied,
QuotaExhausted,
RateLimited,
RequestTimeout,
ResourceAlreadyExists,
Storage,
StreamDeletionPending,
StreamNotFound,
TransactionConflict,
Unavailable,
UpstreamTimeout,
}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.
AccessTokenNotFound
Authn
BadFrame
BadHeader
BadJson
BadPath
BadProto
BadQuery
BasinDeletionPending
BasinNotFound
ClientHangup
DecryptionFailed
HotServer
Invalid
NotImplemented
Other
PermissionDenied
QuotaExhausted
RateLimited
RequestTimeout
ResourceAlreadyExists
Storage
StreamDeletionPending
StreamNotFound
TransactionConflict
UpstreamTimeout
Implementations§
Source§impl ErrorCode
impl ErrorCode
Sourcepub fn is_auth_error(self) -> bool
pub fn is_auth_error(self) -> bool
Whether this code represents an authentication or authorization failure.
Sourcepub fn status(self) -> StatusCode
pub fn status(self) -> StatusCode
HTTP status associated with this error code.
Sourcepub fn is_retryable(self) -> bool
pub fn is_retryable(self) -> bool
Whether retrying an operation that returned this code is sensible.
Sourcepub fn has_no_side_effects(self) -> bool
pub fn has_no_side_effects(self) -> bool
Whether the server guarantees that an operation returning this code had no side effects.
Trait Implementations§
impl Copy for ErrorCode
Source§impl<'de> Deserialize<'de> for ErrorCode
impl<'de> Deserialize<'de> for ErrorCode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ErrorCode
impl StructuralPartialEq for ErrorCode
Auto Trait Implementations§
impl Freeze for ErrorCode
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnsafeUnpin for ErrorCode
impl UnwindSafe for ErrorCode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more