pub enum ParseError {
Incomplete,
BadRequest(String),
BadResponse(String),
UnsupportedTransferEncoding,
BodyTooLarge,
HeadersTooLarge,
}Expand description
Why a byte buffer could not be parsed into a complete request.
Variants§
Incomplete
Not enough bytes yet — the header terminator or the full body has not arrived. The server should read more and retry.
BadRequest(String)
The request line or a header was malformed.
BadResponse(String)
The status line or a header of a response was malformed — the
client-side mirror of ParseError::BadRequest.
UnsupportedTransferEncoding
Transfer-Encoding: chunked (or any non-identity encoding) — not
supported by the v1 hand-rolled core.
BodyTooLarge
Declared Content-Length exceeds MAX_BODY.
HeadersTooLarge
The header block exceeded MAX_HEADERS before a terminator appeared.
Trait Implementations§
Source§impl Clone for ParseError
impl Clone for ParseError
Source§fn clone(&self) -> ParseError
fn clone(&self) -> ParseError
Returns a duplicate of the value. Read more
1.0.0 · 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 ParseError
impl Debug for ParseError
Source§impl PartialEq for ParseError
impl PartialEq for ParseError
impl Eq for ParseError
impl StructuralPartialEq for ParseError
Auto Trait Implementations§
impl Freeze for ParseError
impl RefUnwindSafe for ParseError
impl Send for ParseError
impl Sync for ParseError
impl Unpin for ParseError
impl UnsafeUnpin for ParseError
impl UnwindSafe for ParseError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.