Enum cosworth::prelude::ParseError
source · pub enum ParseError {
Method,
Uri(InvalidUri),
Version,
Header,
TooLarge,
Incomplete,
Status,
Timeout,
Io(Error),
Utf8(Utf8Error),
}
Expand description
A set of errors that can occur during parsing HTTP streams
Variants§
Method
An invalid Method
, such as GE.T
.
Uri(InvalidUri)
An invalid Uri
, such as exam ple.domain
.
Version
An invalid HttpVersion
, such as HTP/1.1
Header
An invalid Header
.
TooLarge
A message head is too large to be reasonable.
Incomplete
A message reached EOF, but is not complete.
Status
An invalid Status
, such as 1337 ELITE
.
Timeout
A timeout occurred waiting for an IO event.
Io(Error)
An io::Error
that occurred while trying to read or write to a network
stream.
Utf8(Utf8Error)
Parsing a field as string failed
Trait Implementations§
source§impl Debug for ParseError
impl Debug for ParseError
source§impl Display for ParseError
impl Display for ParseError
source§impl Fail for ParseError
impl Fail for ParseError
source§fn cause(&self) -> Option<&(dyn Fail + 'static)>
fn cause(&self) -> Option<&(dyn Fail + 'static)>
Returns a reference to the underlying cause of this failure, if it
is an error that wraps other errors. Read more
source§fn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
Returns a reference to the
Backtrace
carried by this failure, if it
carries one. Read moresource§impl From<Error> for ParseError
impl From<Error> for ParseError
source§fn from(err: Error) -> ParseError
fn from(err: Error) -> ParseError
Converts to this type from the input type.
source§impl From<Error> for ParseError
impl From<Error> for ParseError
source§fn from(err: Error) -> ParseError
fn from(err: Error) -> ParseError
Converts to this type from the input type.
source§impl From<FromUtf8Error> for ParseError
impl From<FromUtf8Error> for ParseError
source§fn from(err: FromUtf8Error) -> ParseError
fn from(err: FromUtf8Error) -> ParseError
Converts to this type from the input type.
source§impl From<InvalidUri> for ParseError
impl From<InvalidUri> for ParseError
source§fn from(err: InvalidUri) -> ParseError
fn from(err: InvalidUri) -> ParseError
Converts to this type from the input type.
source§impl From<ParseError> for MultipartError
impl From<ParseError> for MultipartError
source§fn from(err: ParseError) -> MultipartError
fn from(err: ParseError) -> MultipartError
Converts to this type from the input type.
source§impl From<Utf8Error> for ParseError
impl From<Utf8Error> for ParseError
source§fn from(err: Utf8Error) -> ParseError
fn from(err: Utf8Error) -> ParseError
Converts to this type from the input type.
source§impl ResponseError for ParseError
impl ResponseError for ParseError
Return BadRequest
for ParseError
source§fn error_response(&self) -> HttpResponse
fn error_response(&self) -> HttpResponse
Create response for error Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ParseError
impl Send for ParseError
impl Sync for ParseError
impl Unpin for ParseError
impl !UnwindSafe for ParseError
Blanket Implementations§
§impl<T> AsFail for Twhere
T: Fail,
impl<T> AsFail for Twhere
T: Fail,
source§impl<T> IntoSql for T
impl<T> IntoSql for T
source§fn into_sql<T>(self) -> Self::Expressionwhere
Self: AsExpression<T> + Sized,
fn into_sql<T>(self) -> Self::Expressionwhere
Self: AsExpression<T> + Sized,
Convert
self
to an expression for Diesel’s query builder. Read moresource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
Convert
&self
to an expression for Diesel’s query builder. Read more