#[non_exhaustive]pub enum HootError {
Show 25 variants
OutputOverflow,
HeaderName,
HeaderValue,
Status,
NewLine,
TooManyHeaders,
ForbiddenBodyHeader,
ForbiddenHttp11Header,
ForbiddenTrailer,
SentMoreThanContentLength,
SentLessThanContentLength,
RecvMoreThanContentLength,
RecvLessThanContentLength,
ConvertBytesToStr,
HttpVersionMismatch,
StatusIsNotComplete,
ParseIntError,
DuplicateContentLength,
IncorrectChunk,
Token,
Version,
BodyNotFinished,
UnknownMethod,
UrlError(UrlError),
NotU64,
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
OutputOverflow
The borrowed buffer did not have enough space to hold the data we attempted to write.
Call .flush()
, write the output to the transport followed by Call::resume()
.
HeaderName
Invalid byte in header name.
HeaderValue
Invalid byte in header value.
Status
Invalid Response status.
NewLine
Invalid byte in new line.
TooManyHeaders
Parsed more headers than provided buffer can contain.
ForbiddenBodyHeader
Encountered a forbidden header name.
content-length
and transfer-encoding
must be set using
with_body()
and with_body_chunked()
.
ForbiddenHttp11Header
Header is not allowed for HTTP/1.1
ForbiddenTrailer
The trailer name is not allowed.
SentMoreThanContentLength
Attempt to send more content than declared in the Content-Length
header.
SentLessThanContentLength
Attempt to send less content than declared in the Content-Length
header.
RecvMoreThanContentLength
Attempt to send more content than declared in the Content-Length
header.
RecvLessThanContentLength
Attempt to send less content than declared in the Content-Length
header.
ConvertBytesToStr
Failed to read bytes as &str
HttpVersionMismatch
The requested HTTP version does not match the response HTTP version.
StatusIsNotComplete
If we attempt to call .complete()
on an AttemptStatus that didn’t get full input to succeed.
ParseIntError
Failed to parse an integer. This can happen if a Content-Length header contains bogus.
DuplicateContentLength
More than one Content-Length header in response.
IncorrectChunk
Incoming chunked encoding is incorrect.
Token
Invalid byte where token is required.
Version
Invalid byte in HTTP version.
BodyNotFinished
Did not read body to finish.
UnknownMethod
Request method is unknown.
UrlError(UrlError)
Url parsing error
NotU64
Failed to get a TryInto<u64>
.