Enum rhymuweb::Error[][src]

pub enum Error {
    BadContentEncoding(Error),
    ChunkSizeLineNotValidText {
        chunk_size_line: Vec<u8>,
        source: Utf8Error,
    },
    Headers(Error),
    InvalidChunkSize(ParseIntError),
    InvalidChunkTerminator(Vec<u8>),
    InvalidContentLength(ParseIntError),
    InvalidStatusCode(ParseIntError),
    MessageTooLong,
    RequestLineNoMethodDelimiter(String),
    RequestLineNoMethodOrExtraWhitespace(String),
    RequestLineNoTargetDelimiter(String),
    RequestLineNoTargetOrExtraWhitespace(String),
    RequestLineNotValidText {
        request_line: Vec<u8>,
        source: Utf8Error,
    },
    RequestLineProtocol(String),
    RequestLineTooLong(Vec<u8>),
    RequestTargetUriInvalid(Error),
    StatusCodeOutOfRange(usize),
    StatusLineNoProtocolDelimiter(String),
    StatusLineNoStatusCodeDelimiter(String),
    StatusLineNotValidText {
        status_line: Vec<u8>,
        source: Utf8Error,
    },
    StatusLineProtocol(String),
    StringFormat(Error),
    Trailer(Error),
}

This is the enumeration of all the different kinds of errors which this crate generates.

Variants

BadContentEncoding(Error)

There was an error attempting to decode the body.

ChunkSizeLineNotValidText

The attached bytes did not parse as valid chunk size text.

Fields of ChunkSizeLineNotValidText

chunk_size_line: Vec<u8>

These are the bytes that did not parse as valid chunk size text.

source: Utf8Error

This is the source of the parsing error.

Headers(Error)

An error occurred with the message headers.

InvalidChunkSize(ParseIntError)

A chunk size in the body was invalid.

InvalidChunkTerminator(Vec<u8>)

The attached bytes appeared after the end of a chunk in the place where a carriage-return and line-feed were expected.

InvalidContentLength(ParseIntError)

The Content-Length header value is not valid.

InvalidStatusCode(ParseIntError)

The status code in the status line is not valid.

MessageTooLong

The message is too large to fit within the configured size limit.

RequestLineNoMethodDelimiter(String)

No delimiter was found to parse the method from the attached HTTP request line.

RequestLineNoMethodOrExtraWhitespace(String)

The method could not be parsed from the HTTP request line attached. Either there is extra whitespace, or the method is an empty string.

RequestLineNoTargetDelimiter(String)

No delimiter was found to parse the target URI from the attached HTTP request line.

RequestLineNoTargetOrExtraWhitespace(String)

The target URI could not be parsed from the HTTP request line attached. Either there is extra whitespace, or the target URI is an empty string.

RequestLineNotValidText

The attached bytes did not parse as valid text for the HTTP request line.

Fields of RequestLineNotValidText

request_line: Vec<u8>

These are the bytes that did not parse as valid request line text.

source: Utf8Error

This is the source of the parsing error.

RequestLineProtocol(String)

The protocol is unrecognized or could not be parsed from the HTTP request line attached.

RequestLineTooLong(Vec<u8>)

The attached bytes are the beginning of the request line, whose length exceeds the request line limit.

RequestTargetUriInvalid(Error)

The request line contained an invalid target URI.

StatusCodeOutOfRange(usize)

The attached status code was out of range.

StatusLineNoProtocolDelimiter(String)

No delimiter was found to parse the protocol from the attached HTTP status line.

StatusLineNoStatusCodeDelimiter(String)

No delimiter was found to parse the status code from the attached HTTP status line.

StatusLineNotValidText

The attached bytes did not parse as valid text for the HTTP status line.

Fields of StatusLineNotValidText

status_line: Vec<u8>

These are the bytes that did not parse as valid status line text.

source: Utf8Error

This is the source of the parsing error.

StatusLineProtocol(String)

The protocol is unrecognized or could not be parsed from the HTTP status line attached.

StringFormat(Error)

An error occurred during string formatting.

Trailer(Error)

An error occurred with the message trailer.

Trait Implementations

impl Debug for Error[src]

impl Display for Error[src]

impl Error for Error[src]

impl From<Error> for Error[src]

impl From<Error> for Error[src]

Auto Trait Implementations

impl !RefUnwindSafe for Error

impl Send for Error

impl Sync for Error

impl Unpin for Error

impl !UnwindSafe for Error

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.