#[non_exhaustive]pub enum HeaderError {
Syntax {
header: &'static str,
},
OutOfRange {
header: &'static str,
},
Uri {
header: &'static str,
source: UriError,
},
UnterminatedQuotedString {
header: &'static str,
},
}Expand description
A header whose value could not be parsed, or whose value is out of range.
Distinct from a parse error: the message framed correctly and this one header is bad. A proxy may still forward such a message; only a party that needs to read the header has a problem.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Syntax
The value does not match the header’s grammar.
OutOfRange
The value parses but falls outside the range the RFC permits — a CSeq above
2^31-1, a Max-Forwards above 255, a status code outside 100..=699.
Uri
A URI inside the header did not parse.
UnterminatedQuotedString
A quoted string with no closing quote.
Trait Implementations§
Source§impl Clone for HeaderError
impl Clone for HeaderError
Source§fn clone(&self) -> HeaderError
fn clone(&self) -> HeaderError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HeaderError
impl Debug for HeaderError
Source§impl Display for HeaderError
impl Display for HeaderError
Source§impl Error for HeaderError
impl Error for HeaderError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for HeaderError
impl PartialEq for HeaderError
Source§fn eq(&self, other: &HeaderError) -> bool
fn eq(&self, other: &HeaderError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for HeaderError
impl StructuralPartialEq for HeaderError
Auto Trait Implementations§
impl Freeze for HeaderError
impl RefUnwindSafe for HeaderError
impl Send for HeaderError
impl Sync for HeaderError
impl Unpin for HeaderError
impl UnsafeUnpin for HeaderError
impl UnwindSafe for HeaderError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more