Enum trillium_http::Error [−][src]
#[non_exhaustive]
pub enum Error {
Show 18 variants
Io(Error),
UnexpectedUriFormat,
HeaderMissing(&'static str),
RequestPathMissing,
Closed,
Httparse(Error),
TryFromIntError(TryFromIntError),
PartialHead,
MalformedHeader(Cow<'static, str>),
UnsupportedVersion(u8),
UnrecognizedMethod(String),
MissingMethod,
MissingStatusCode,
UnrecognizedStatusCode(u16),
MissingVersion,
EncodingError(Utf8Error),
UnexpectedHeader(&'static str),
HeadersTooLong,
}Expand description
Concrete errors that occur within trillium’s http implementation
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Tuple Fields of Io
0: Errorthis error describes a malformed request with a path that does not start with / or http:// or https://
the relevant http protocol expected this header, but it was not provided
Tuple Fields of HeaderMissing
0: &'static strthis error describes a request that does not specify a path
connection was closed
Tuple Fields of Httparse
0: ErrorTuple Fields of TryFromIntError
an incomplete http head
we were unable to parse a header
async-h1 doesn’t speak this http version this error is deprecated
Tuple Fields of UnsupportedVersion
0: u8we were unable to parse this http method
Tuple Fields of UnrecognizedMethod
0: Stringthis request did not have a method
this request did not have a status code
we were unable to parse this http method
Tuple Fields of UnrecognizedStatusCode
0: u16this request did not have a version, but we expect one this error is deprecated
we expected utf8, but there was an encoding error
Tuple Fields of EncodingError
0: Utf8Errorwe received a header that does not make sense in context
Tuple Fields of UnexpectedHeader
0: &'static strfor security reasons, we do not allow request headers beyond 8kb.
Trait Implementations
Performs the conversion.