[][src]Enum rhymessage::Error

pub enum Error {
    HeaderLineCouldNotBeFolded(String),
    HeaderLineInvalidText {
        line: Vec<u8>,
        source: Utf8Error,
    },
    HeaderLineMissingColon(String),
    HeaderLineTooLong(Vec<u8>),
    HeaderNameContainsIllegalCharacter(String),
    HeaderValueContainsIllegalCharacter {
        name: HeaderName,
        value_segment: String,
    },
    StringFormat(Error),
}

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

Variants

HeaderLineCouldNotBeFolded(String)

The attached string is a header, or part of a header, that is too long and cannot be folded to fit.

HeaderLineInvalidText

The given line of input could not be interpreted as text.

Fields of HeaderLineInvalidText

line: Vec<u8>

This is the line which could not be interpreted as text.

source: Utf8Error

This is the UTF-8 conversion error that occurred trying to convert the line to text.

HeaderLineMissingColon(String)

The attached string was expected to be a header line, but does not have a colon in it.

HeaderLineTooLong(Vec<u8>)

The attached byte vector is the beginning of a line that was expected to be a header line. The header line length limit was exceeded before the line terminator could be found.

HeaderNameContainsIllegalCharacter(String)

The attached string is the name of a header encountered that has one or more illegal characters in it.

HeaderValueContainsIllegalCharacter

The header with the attached name has a value containing an illegal character, found in the attached segment.

Fields of HeaderValueContainsIllegalCharacter

name: HeaderName

This is the name of the header whose value contained an illegal character.

value_segment: String

This is the part of the header value containing the illegal character.

StringFormat(Error)

The attached error occurred during string formatting.

Trait Implementations

impl Clone for Error[src]

impl Debug for Error[src]

impl Display for Error[src]

impl Error for Error[src]

impl From<Error> for Error[src]

impl PartialEq<Error> for Error[src]

impl StructuralPartialEq 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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.