#[non_exhaustive]pub enum ErrorKind {
Show 16 variants
Configuration,
Unauthorized,
Forbidden,
HttpStatus,
Transport,
ResponseTooLarge,
Encode,
Api,
Decode,
Utf8,
WebSocketConnectTimeout,
WebSocket,
Proxy,
EventDecode,
UnexpectedWebSocketFrame,
MissingObject,
}Expand description
Stable category for an Error without exposing its variant fields.
This is useful for metrics and policy decisions that should not depend on
the concrete error payload. Use Error::status, Error::method, and
Error::url when the associated HTTP context is needed.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Configuration
Invalid client or request configuration.
Missing or expired authentication.
Forbidden
Authorization or CSRF rejection.
HttpStatus
Non-success HTTP status other than 401 or 403.
Transport
HTTP transport or response-body IO failure.
ResponseTooLarge
HTTP response body exceeded its configured memory limit.
Encode
Request serialization failure.
Api
Application-level rejection in a successful HTTP response.
Decode
HTTP response JSON decoding failure.
Utf8
Invalid UTF-8 response body.
WebSocketConnectTimeout
WebSocket connection timeout.
WebSocket
WebSocket handshake, transport, or protocol failure.
Proxy
Explicit outbound proxy connection or negotiation failure.
EventDecode
WebSocket event JSON decoding failure.
UnexpectedWebSocketFrame
Unsupported WebSocket application frame.
MissingObject
Successful response missing its required object.
Implementations§
Trait Implementations§
impl Copy for ErrorKind
impl Eq for ErrorKind
impl StructuralPartialEq for ErrorKind
Auto Trait Implementations§
impl Freeze for ErrorKind
impl RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnsafeUnpin for ErrorKind
impl UnwindSafe for ErrorKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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 more