#[non_exhaustive]pub enum ParseError {
Show 21 variants
InvalidContentType,
EmptyBody,
NotExist,
ParseFromStr,
InvalidStatusCode(InvalidStatusCode),
InvalidMethod(InvalidMethod),
InvalidUri(InvalidUri),
InvalidUriParts(InvalidUriParts),
InvalidHeaderName(InvalidHeaderName),
InvalidHeaderValue(InvalidHeaderValue),
Deserialize(Error),
DuplicateKey,
NotMultipart,
NotFormData,
InvalidRange,
Multer(Error),
Io(Error),
Hyper(Error),
Utf8(Utf8Error),
SerdeJson(Error),
Other(Box<dyn Error + Send + Sync>),
}Expand description
Errors happened when read data from http request.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidContentType
The Hyper request did not have a valid Content-Type header.
EmptyBody
The Hyper request’s body is empty.
NotExist
The Hyper request’s body is empty.
ParseFromStr
Parse error when parse from str.
InvalidStatusCode(InvalidStatusCode)
A possible error value when converting a StatusCode from a u16 or &str
This error indicates that the supplied input was not a valid number, was less
than 100, or was greater than 999.
InvalidMethod(InvalidMethod)
A possible error value when converting Method from bytes.
InvalidUri(InvalidUri)
An error resulting from a failed attempt to construct a URI.
InvalidUriParts(InvalidUriParts)
An error resulting from a failed attempt to construct a URI.
InvalidHeaderName(InvalidHeaderName)
A possible error when converting a HeaderName from another type.
InvalidHeaderValue(InvalidHeaderValue)
A possible error when converting a HeaderValue from a string or byte slice.
Deserialize(Error)
Deserialize error when parse from request.
DuplicateKey
DuplicateKey.
NotMultipart
The Hyper request Content-Type top-level Mime was not Multipart.
NotFormData
The Hyper request Content-Type sub-level Mime was not FormData.
InvalidRange
InvalidRange.
Multer(Error)
An multer error.
Io(Error)
An I/O error.
Hyper(Error)
An error was returned from hyper.
Utf8(Utf8Error)
An error occurred during UTF-8 processing.
SerdeJson(Error)
Serde json error.
Other(Box<dyn Error + Send + Sync>)
Custom error that does not fall under any other error kind.
Implementations§
Trait Implementations§
Source§impl Debug for ParseError
impl Debug for ParseError
Source§impl Display for ParseError
impl Display for ParseError
Source§impl Error for ParseError
impl Error for ParseError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<Error> for ParseError
impl From<Error> for ParseError
Source§fn from(source: Error) -> ParseError
fn from(source: Error) -> ParseError
Source§impl From<Error> for ParseError
impl From<Error> for ParseError
Source§fn from(source: Error) -> ParseError
fn from(source: Error) -> ParseError
Source§impl From<Error> for ParseError
impl From<Error> for ParseError
Source§fn from(source: Error) -> ParseError
fn from(source: Error) -> ParseError
Source§impl From<Error> for ParseError
impl From<Error> for ParseError
Source§fn from(source: Error) -> ParseError
fn from(source: Error) -> ParseError
Source§impl From<Error> for ParseError
impl From<Error> for ParseError
Source§fn from(source: Error) -> ParseError
fn from(source: Error) -> ParseError
Source§impl From<InvalidHeaderName> for ParseError
impl From<InvalidHeaderName> for ParseError
Source§fn from(source: InvalidHeaderName) -> ParseError
fn from(source: InvalidHeaderName) -> ParseError
Source§impl From<InvalidHeaderValue> for ParseError
impl From<InvalidHeaderValue> for ParseError
Source§fn from(source: InvalidHeaderValue) -> ParseError
fn from(source: InvalidHeaderValue) -> ParseError
Source§impl From<InvalidMethod> for ParseError
impl From<InvalidMethod> for ParseError
Source§fn from(source: InvalidMethod) -> ParseError
fn from(source: InvalidMethod) -> ParseError
Source§impl From<InvalidStatusCode> for ParseError
impl From<InvalidStatusCode> for ParseError
Source§fn from(source: InvalidStatusCode) -> ParseError
fn from(source: InvalidStatusCode) -> ParseError
Source§impl From<InvalidUri> for ParseError
impl From<InvalidUri> for ParseError
Source§fn from(source: InvalidUri) -> ParseError
fn from(source: InvalidUri) -> ParseError
Source§impl From<InvalidUriParts> for ParseError
impl From<InvalidUriParts> for ParseError
Source§fn from(source: InvalidUriParts) -> ParseError
fn from(source: InvalidUriParts) -> ParseError
Source§impl From<ParseError> for Error
impl From<ParseError> for Error
Source§fn from(d: ParseError) -> Error
fn from(d: ParseError) -> Error
Source§impl From<Utf8Error> for ParseError
impl From<Utf8Error> for ParseError
Source§fn from(source: Utf8Error) -> ParseError
fn from(source: Utf8Error) -> ParseError
Source§impl Writer for ParseError
impl Writer for ParseError
Source§fn write<'life0, 'life1, 'life2, 'async_trait>(
self,
_req: &'life0 mut Request,
_depot: &'life1 mut Depot,
res: &'life2 mut Response,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
ParseError: 'async_trait,
fn write<'life0, 'life1, 'life2, 'async_trait>(
self,
_req: &'life0 mut Request,
_depot: &'life1 mut Depot,
res: &'life2 mut Response,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
ParseError: 'async_trait,
Response.Auto Trait Implementations§
impl Freeze for ParseError
impl !RefUnwindSafe for ParseError
impl Send for ParseError
impl Sync for ParseError
impl Unpin for ParseError
impl !UnwindSafe for ParseError
Blanket Implementations§
Source§impl<Data> ApiSuccessResponse for Data
impl<Data> ApiSuccessResponse for Data
fn api_response<Meta>(self, meta: Option<Meta>) -> ApiResponse<Self, Meta>
fn api_response_without_meta<Meta>(self) -> ApiResponse<Self, Meta>
fn api_response_with_meta<Meta>(self, meta: Meta) -> ApiResponse<Self, Meta>
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> 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> FutureTraceExt for Twhere
T: FutureExt,
impl<T> FutureTraceExt for Twhere
T: FutureExt,
Source§fn with_current_context_span(self, otel_span: Span) -> WithContext<Self> ⓘ
fn with_current_context_span(self, otel_span: Span) -> 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 moreSource§impl<E> IntoError for E
impl<E> IntoError for E
fn into_error(self) -> ErrWrapper<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more