#[non_exhaustive]pub enum HeaderSyntaxError {
MissingColon,
EmptyName,
NameNotToken,
BareNewline,
LeadingFold,
}Expand description
What was wrong with a header field line.
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.
MissingColon
No colon separating name from value.
EmptyName
The field name is empty.
NameNotToken
The field name contains a character outside the token set.
BareNewline
A bare CR or LF where a CRLF was required.
sipx never accepts a bare LF as a line terminator: two elements disagreeing about where a message ends is how a body becomes a second request.
LeadingFold
The first line of the header section begins with whitespace, so it continues a header that does not exist.
Trait Implementations§
Source§impl Clone for HeaderSyntaxError
impl Clone for HeaderSyntaxError
Source§fn clone(&self) -> HeaderSyntaxError
fn clone(&self) -> HeaderSyntaxError
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 HeaderSyntaxError
impl Debug for HeaderSyntaxError
Source§impl Display for HeaderSyntaxError
impl Display for HeaderSyntaxError
Source§impl Error for HeaderSyntaxError
impl Error for HeaderSyntaxError
1.30.0 · 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 HeaderSyntaxError
impl PartialEq for HeaderSyntaxError
Source§fn eq(&self, other: &HeaderSyntaxError) -> bool
fn eq(&self, other: &HeaderSyntaxError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for HeaderSyntaxError
impl StructuralPartialEq for HeaderSyntaxError
Auto Trait Implementations§
impl Freeze for HeaderSyntaxError
impl RefUnwindSafe for HeaderSyntaxError
impl Send for HeaderSyntaxError
impl Sync for HeaderSyntaxError
impl Unpin for HeaderSyntaxError
impl UnsafeUnpin for HeaderSyntaxError
impl UnwindSafe for HeaderSyntaxError
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