#[non_exhaustive]pub enum ApiErrorKind {
ValidationFailed,
CursorInvalid,
CursorMismatch,
Unauthorized,
Forbidden,
NotFound,
RateLimited,
InternalError,
Other,
}Expand description
Kind of an API error, from the problem code or, without one, from the status.
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.
ValidationFailed
VALIDATION_FAILED, or a 400 without a code.
CursorInvalid
CURSOR_INVALID.
CursorMismatch
CURSOR_MISMATCH.
UNAUTHORIZED, or a refused dial with 401.
Forbidden
FORBIDDEN, or a refused dial with 403.
NotFound
NOT_FOUND, or a 404 without a code.
RateLimited
RATE_LIMITED, or a refused dial with 429.
InternalError
INTERNAL_ERROR, or a refused dial with 5xx.
Other
An unknown code, or no code at all.
Implementations§
Trait Implementations§
Source§impl Clone for ApiErrorKind
impl Clone for ApiErrorKind
impl Copy for ApiErrorKind
Source§impl Debug for ApiErrorKind
impl Debug for ApiErrorKind
Source§impl Display for ApiErrorKind
impl Display for ApiErrorKind
impl Eq for ApiErrorKind
Source§impl Hash for ApiErrorKind
impl Hash for ApiErrorKind
Source§impl PartialEq for ApiErrorKind
impl PartialEq for ApiErrorKind
impl StructuralPartialEq for ApiErrorKind
Auto Trait Implementations§
impl Forget for ApiErrorKind
impl Freeze for ApiErrorKind
impl Move for ApiErrorKind
impl RefUnwindSafe for ApiErrorKind
impl Send for ApiErrorKind
impl Sync for ApiErrorKind
impl Unpin for ApiErrorKind
impl UnsafeUnpin for ApiErrorKind
impl UnwindSafe for ApiErrorKind
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