pub struct ErrorCode { /* private fields */ }Expand description
ErrorCode is a wrapper around u32 that represents an error code.
Implementations§
Source§impl ErrorCode
impl ErrorCode
Sourcepub const BAD_REQUEST: Self
pub const BAD_REQUEST: Self
Indicated a bad request.
Sourcepub const UNAUTHORIZED: Self
pub const UNAUTHORIZED: Self
Indicates that authentication is required.
Sourcepub const PAYMENT_REQUIRED: Self
pub const PAYMENT_REQUIRED: Self
Indicates that payment is required.
Sourcepub const METHOD_NOT_ALLOWED: Self
pub const METHOD_NOT_ALLOWED: Self
Indicates that the request method is not allowed.
Sourcepub const NOT_ACCEPTABLE: Self
pub const NOT_ACCEPTABLE: Self
Indicates that the requested response format is not acceptable.
Sourcepub const PROXY_AUTHENTICATION_REQUIRED: Self
pub const PROXY_AUTHENTICATION_REQUIRED: Self
Indicates that proxy authentication is required.
Sourcepub const REQUEST_TIMEOUT: Self
pub const REQUEST_TIMEOUT: Self
Indicates that the request timed out.
Sourcepub const LENGTH_REQUIRED: Self
pub const LENGTH_REQUIRED: Self
Indicates that the request must include a content length.
Sourcepub const PRECONDITION_FAILED: Self
pub const PRECONDITION_FAILED: Self
Indicates that a precondition failed.
Sourcepub const PAYLOAD_TOO_LARGE: Self
pub const PAYLOAD_TOO_LARGE: Self
Indicates that the payload is too large.
Sourcepub const URI_TOO_LONG: Self
pub const URI_TOO_LONG: Self
Indicates that the URI is too long.
Sourcepub const UNSUPPORTED_MEDIA_TYPE: Self
pub const UNSUPPORTED_MEDIA_TYPE: Self
Indicates that the media type is unsupported.
Sourcepub const RANGE_NOT_SATISFIABLE: Self
pub const RANGE_NOT_SATISFIABLE: Self
Indicates that the requested range cannot be satisfied.
Sourcepub const EXPECTATION_FAILED: Self
pub const EXPECTATION_FAILED: Self
Indicates that an expectation failed.
Sourcepub const IM_A_TEAPOT: Self
pub const IM_A_TEAPOT: Self
Indicates an I’m a teapot response.
Sourcepub const MISDIRECTED_REQUEST: Self
pub const MISDIRECTED_REQUEST: Self
Indicates that the request was misdirected.
Sourcepub const UNPROCESSABLE_ENTITY: Self
pub const UNPROCESSABLE_ENTITY: Self
Indicates that the entity could not be processed.
Sourcepub const FAILED_DEPENDENCY: Self
pub const FAILED_DEPENDENCY: Self
Indicates a failed dependency.
Sourcepub const UPGRADE_REQUIRED: Self
pub const UPGRADE_REQUIRED: Self
Indicates that the request must be upgraded.
Sourcepub const PRECONDITION_REQUIRED: Self
pub const PRECONDITION_REQUIRED: Self
Indicates that a precondition is required.
Sourcepub const TOO_MANY_REQUESTS: Self
pub const TOO_MANY_REQUESTS: Self
Indicates too many requests.
Sourcepub const REQUEST_HEADER_FIELDS_TOO_LARGE: Self
pub const REQUEST_HEADER_FIELDS_TOO_LARGE: Self
Indicates that request header fields are too large.
Sourcepub const UNAVAILABLE_FOR_LEGAL_REASONS: Self
pub const UNAVAILABLE_FOR_LEGAL_REASONS: Self
Indicates that the request is unavailable for legal reasons.
Sourcepub const INTERNAL_ERROR: Self
pub const INTERNAL_ERROR: Self
Indicates an internal server error.
Sourcepub const NOT_IMPLEMENTED: Self
pub const NOT_IMPLEMENTED: Self
Indicates a non-implemented endpoint.
Sourcepub const BAD_GATEWAY: Self
pub const BAD_GATEWAY: Self
Indicates a bad gateway.
Sourcepub const SERVICE_UNAVAILABLE: Self
pub const SERVICE_UNAVAILABLE: Self
Indicates that the service is unavailable.
Sourcepub const GATEWAY_TIMEOUT: Self
pub const GATEWAY_TIMEOUT: Self
Indicates a gateway timeout.
Sourcepub const HTTP_VERSION_NOT_SUPPORTED: Self
pub const HTTP_VERSION_NOT_SUPPORTED: Self
Indicates that the HTTP version is not supported.
Sourcepub const VARIANT_ALSO_NEGOTIATES: Self
pub const VARIANT_ALSO_NEGOTIATES: Self
Indicates that content negotiation also found a variant problem.
Sourcepub const INSUFFICIENT_STORAGE: Self
pub const INSUFFICIENT_STORAGE: Self
Indicates insufficient storage.
Sourcepub const LOOP_DETECTED: Self
pub const LOOP_DETECTED: Self
Indicates that a loop was detected.
Sourcepub const NOT_EXTENDED: Self
pub const NOT_EXTENDED: Self
Indicates that the request must be extended.
Sourcepub const NETWORK_AUTHENTICATION_REQUIRED: Self
pub const NETWORK_AUTHENTICATION_REQUIRED: Self
Indicates that network authentication is required.
pub const fn kind(self) -> &'static str
pub fn from_name(name: &str) -> Option<Self>
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>,
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
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<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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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