#[non_exhaustive]pub enum CodecRejection {
Bytes(BytesRejection),
Json(Error),
Form(Error),
MsgPack(Error),
Bincode(DecodeError),
Bitcode(Error),
Yaml(Error),
Toml(Error),
Utf8Error(Utf8Error),
Validator(ValidationErrors),
}
Expand description
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.
Bytes(BytesRejection)
Json(Error)
Form(Error)
MsgPack(Error)
Bincode(DecodeError)
Bitcode(Error)
Yaml(Error)
Toml(Error)
Utf8Error(Utf8Error)
Validator(ValidationErrors)
Implementations§
Source§impl CodecRejection
impl CodecRejection
Sourcepub fn status_code(&self) -> StatusCode
pub fn status_code(&self) -> StatusCode
Returns the HTTP status code for the rejection.
Trait Implementations§
Source§impl Debug for CodecRejection
impl Debug for CodecRejection
Source§impl Display for CodecRejection
impl Display for CodecRejection
Source§impl Error for CodecRejection
impl Error for CodecRejection
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<BytesRejection> for CodecRejection
impl From<BytesRejection> for CodecRejection
Source§fn from(source: BytesRejection) -> Self
fn from(source: BytesRejection) -> Self
Converts to this type from the input type.
Source§impl From<DecodeError> for CodecRejection
impl From<DecodeError> for CodecRejection
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for CodecRejection
impl From<Error> for CodecRejection
Source§impl From<Error> for CodecRejection
impl From<Error> for CodecRejection
Source§impl From<Error> for CodecRejection
impl From<Error> for CodecRejection
Source§impl From<Error> for CodecRejection
impl From<Error> for CodecRejection
Source§impl From<Error> for CodecRejection
impl From<Error> for CodecRejection
Source§impl From<Error> for CodecRejection
impl From<Error> for CodecRejection
Source§impl From<Utf8Error> for CodecRejection
impl From<Utf8Error> for CodecRejection
Source§impl From<ValidationErrors> for CodecRejection
impl From<ValidationErrors> for CodecRejection
Source§fn from(source: ValidationErrors) -> Self
fn from(source: ValidationErrors) -> Self
Converts to this type from the input type.
Source§impl IntoCodecResponse for CodecRejection
impl IntoCodecResponse for CodecRejection
fn into_codec_response(self, content_type: ContentType) -> Response
Source§impl OperationOutput for CodecRejection
impl OperationOutput for CodecRejection
Source§fn operation_response(
ctx: &mut GenContext,
operation: &mut Operation,
) -> Option<Response>
fn operation_response( ctx: &mut GenContext, operation: &mut Operation, ) -> Option<Response>
Return a response documentation for this type,
alternatively modify the operation if required. Read more
Source§fn inferred_responses(
ctx: &mut GenContext,
operation: &mut Operation,
) -> Vec<(Option<u16>, Response)>
fn inferred_responses( ctx: &mut GenContext, operation: &mut Operation, ) -> Vec<(Option<u16>, Response)>
Inferred responses are used when the type is
used as a request handler return type. Read more
Auto Trait Implementations§
impl Freeze for CodecRejection
impl !RefUnwindSafe for CodecRejection
impl Send for CodecRejection
impl Sync for CodecRejection
impl Unpin for CodecRejection
impl !UnwindSafe for CodecRejection
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> 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> ValidateIp for Twhere
T: ToString,
impl<T> ValidateIp for Twhere
T: ToString,
Source§fn validate_ipv4(&self) -> bool
fn validate_ipv4(&self) -> bool
Validates whether the given string is an IP V4
Source§fn validate_ipv6(&self) -> bool
fn validate_ipv6(&self) -> bool
Validates whether the given string is an IP V6
Source§fn validate_ip(&self) -> bool
fn validate_ip(&self) -> bool
Validates whether the given string is an IP