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),
}Expand description
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
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
name: HeaderNameThis is the name of the header whose value contained an illegal character.
StringFormat(Error)
The attached error occurred during string formatting.