#[non_exhaustive]pub enum StartLineError {
Empty,
RequestLineShape,
Method,
Uri(UriError),
MissingStatusCode,
StatusCode,
}Expand description
What was wrong with a start 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.
Empty
The message is empty, or the start line is.
RequestLineShape
A request line did not have exactly three space-separated elements. Covers multiple spaces between elements and a trailing space (RFC 4475 §3.1.2.9, §3.1.2.10).
Method
The method is not a token.
Uri(UriError)
The Request-URI did not parse — including when it is wrapped in <>
(RFC 4475 §3.1.2.7) or contains whitespace (§3.1.2.8).
MissingStatusCode
A status line had no status code.
StatusCode
The status code is not exactly three digits in 100..=699 (RFC 4475 §3.1.2.19).
Trait Implementations§
Source§impl Clone for StartLineError
impl Clone for StartLineError
Source§fn clone(&self) -> StartLineError
fn clone(&self) -> StartLineError
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 StartLineError
impl Debug for StartLineError
Source§impl Display for StartLineError
impl Display for StartLineError
Source§impl Error for StartLineError
impl Error for StartLineError
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 From<StartLineError> for ParseError
impl From<StartLineError> for ParseError
Source§fn from(source: StartLineError) -> Self
fn from(source: StartLineError) -> Self
Converts to this type from the input type.
Source§impl From<UriError> for StartLineError
impl From<UriError> for StartLineError
Source§impl PartialEq for StartLineError
impl PartialEq for StartLineError
Source§fn eq(&self, other: &StartLineError) -> bool
fn eq(&self, other: &StartLineError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for StartLineError
impl StructuralPartialEq for StartLineError
Auto Trait Implementations§
impl Freeze for StartLineError
impl RefUnwindSafe for StartLineError
impl Send for StartLineError
impl Sync for StartLineError
impl Unpin for StartLineError
impl UnsafeUnpin for StartLineError
impl UnwindSafe for StartLineError
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