pub enum DecodeError {
Method,
Uri,
Version,
Header,
MaxHeaders,
TooLarge(usize),
StartLineTooLong(usize),
UnsupportedTransferCoding,
Incomplete,
Status,
InvalidInput(&'static str),
Utf8,
}Expand description
Errors that can occur while parsing HTTP streams.
Variants§
Method
An invalid Method, such as GE.T.
Uri
An invalid Uri, such as exam ple.domain.
Version
An invalid HttpVersion, such as HTP/1.1
Header
An invalid Header.
MaxHeaders
The message contains more headers than the configured limit.
TooLarge(usize)
A message head is too large to be reasonable.
StartLineTooLong(usize)
A request or status line exceeds the configured limit.
UnsupportedTransferCoding
A request applies a transfer coding other than chunked.
Incomplete
A message reached EOF, but is not complete.
Status
An invalid Status, such as 1337 ELITE.
InvalidInput(&'static str)
An InvalidInput occurred while trying to parse incoming stream.
Utf8
Parsing a field as string failed
Trait Implementations§
Source§impl Clone for DecodeError
impl Clone for DecodeError
Source§fn clone(&self) -> DecodeError
fn clone(&self) -> DecodeError
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 moreimpl Copy for DecodeError
Source§impl Debug for DecodeError
impl Debug for DecodeError
Source§impl Display for DecodeError
impl Display for DecodeError
impl Eq for DecodeError
Source§impl Error for DecodeError
impl Error for DecodeError
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 From<DecodeError> for ClientError
impl From<DecodeError> for ClientError
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<DecodeError> for PayloadError
impl From<DecodeError> for PayloadError
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<DecodeError> for ProtocolError
impl From<DecodeError> for ProtocolError
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<DecodeError> for WsClientError
impl From<DecodeError> for WsClientError
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for DecodeError
impl From<Error> for DecodeError
Source§fn from(err: Error) -> DecodeError
fn from(err: Error) -> DecodeError
Converts to this type from the input type.
Source§impl From<Error> for DecodeError
impl From<Error> for DecodeError
Source§fn from(err: Error) -> DecodeError
fn from(err: Error) -> DecodeError
Converts to this type from the input type.
Source§impl From<FromUtf8Error> for DecodeError
impl From<FromUtf8Error> for DecodeError
Source§fn from(_: FromUtf8Error) -> DecodeError
fn from(_: FromUtf8Error) -> DecodeError
Converts to this type from the input type.
Source§impl From<InvalidUrl> for DecodeError
impl From<InvalidUrl> for DecodeError
Source§fn from(_: InvalidUrl) -> DecodeError
fn from(_: InvalidUrl) -> DecodeError
Converts to this type from the input type.
Source§impl Hash for DecodeError
impl Hash for DecodeError
Source§impl PartialEq for DecodeError
impl PartialEq for DecodeError
impl StructuralPartialEq for DecodeError
Auto Trait Implementations§
impl Freeze for DecodeError
impl RefUnwindSafe for DecodeError
impl Send for DecodeError
impl Sync for DecodeError
impl Unpin for DecodeError
impl UnsafeUnpin for DecodeError
impl UnwindSafe for DecodeError
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
Compare self to
key and return true if they are equal.