Enum poem_openapi::ParseRequestError [−][src]
pub enum ParseRequestError {
ParseParam {
name: &'static str,
reason: String,
},
ParseRequestBody(Response),
ContentTypeNotSupported {
content_type: String,
},
ExpectContentType,
Extractor(Response),
Authorization,
}
Expand description
This type represents errors that occur when parsing the HTTP request.
Variants
ParseParam
Failed to parse a parameter.
ParseRequestBody(Response)
Tuple Fields
0: Response
Failed to parse a request body.
ContentTypeNotSupported
Fields
content_type: String
The Content-Type
header requested by the client.
The Content-Type
requested by the client is not supported.
ExpectContentType
The client request does not include the Content-Type
header.
Extractor(Response)
Tuple Fields
0: Response
Poem extractor error.
Authorization
Authorization error.
Trait Implementations
Consume itself and return Response
.
fn with_header<K, V>(self, key: K, value: V) -> WithHeader<Self> where
K: TryInto<HeaderName>,
V: TryInto<HeaderValue>,
fn with_header<K, V>(self, key: K, value: V) -> WithHeader<Self> where
K: TryInto<HeaderName>,
V: TryInto<HeaderValue>,
Wrap an impl IntoResponse
to add a header. Read more
Wrap an impl IntoResponse
to set a status code. Read more
Auto Trait Implementations
impl !RefUnwindSafe for ParseRequestError
impl Send for ParseRequestError
impl Sync for ParseRequestError
impl Unpin for ParseRequestError
impl !UnwindSafe for ParseRequestError
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more