Enum salvo_core::http::errors::ParseError
source · #[non_exhaustive]pub enum ParseError {
Show 20 variants
InvalidContentType,
EmptyBody,
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(BoxedError),
}
Expand description
ParseError, 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.
ParseFromStr
Parse error when parse from str.
InvalidStatusCode(InvalidStatusCode)
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(BoxedError)
Custom error that does not fall under any other error kind.
Implementations§
source§impl ParseError
impl ParseError
sourcepub fn other(error: impl Into<BoxedError>) -> Self
pub fn other(error: impl Into<BoxedError>) -> Self
Create a custom error.
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§impl From<Error> for ParseError
impl From<Error> for ParseError
source§impl From<Error> for ParseError
impl From<Error> for ParseError
source§impl From<Error> for ParseError
impl From<Error> for ParseError
source§impl From<Error> for ParseError
impl From<Error> for ParseError
source§impl From<InvalidHeaderName> for ParseError
impl From<InvalidHeaderName> for ParseError
source§fn from(source: InvalidHeaderName) -> Self
fn from(source: InvalidHeaderName) -> Self
source§impl From<InvalidHeaderValue> for ParseError
impl From<InvalidHeaderValue> for ParseError
source§fn from(source: InvalidHeaderValue) -> Self
fn from(source: InvalidHeaderValue) -> Self
source§impl From<InvalidMethod> for ParseError
impl From<InvalidMethod> for ParseError
source§fn from(source: InvalidMethod) -> Self
fn from(source: InvalidMethod) -> Self
source§impl From<InvalidStatusCode> for ParseError
impl From<InvalidStatusCode> for ParseError
source§fn from(source: InvalidStatusCode) -> Self
fn from(source: InvalidStatusCode) -> Self
source§impl From<InvalidUri> for ParseError
impl From<InvalidUri> for ParseError
source§fn from(source: InvalidUri) -> Self
fn from(source: InvalidUri) -> Self
source§impl From<InvalidUriParts> for ParseError
impl From<InvalidUriParts> for ParseError
source§fn from(source: InvalidUriParts) -> Self
fn from(source: InvalidUriParts) -> Self
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§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
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: '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
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Response
.