Enum async_proto::ReadErrorKind
source · pub enum ReadErrorKind {
Show 16 variants
BufSize(TryFromIntError),
Custom(String),
EndOfStream,
FloatNotFinite,
MessageKind(Message),
ReadNever,
TryReserve(TryReserveError),
UnknownVariant8(u8),
UnknownVariant16(u16),
UnknownVariant32(u32),
UnknownVariant64(u64),
UnknownVariant128(u128),
Io(Error),
Tungstenite(Error),
Utf8(FromUtf8Error),
Warp(Error),
}
Expand description
Specifies what went wrong while reading (receiving) a value.
Variants§
BufSize(TryFromIntError)
Received a buffer with more than usize::MAX
elements
Custom(String)
An error variant you can use when manually implementing Protocol
EndOfStream
The end of the stream was encountered before a complete value was read.
Note that this error condition may also be represented as a ReadErrorKind::Io
with kind
UnexpectedEof
.
FloatNotFinite
MessageKind(Message)
Received a non-Binary WebSocket message (e.g. Text or Ping).
ReadNever
Attempted to read an empty type
TryReserve(TryReserveError)
UnknownVariant8(u8)
UnknownVariant16(u16)
UnknownVariant32(u32)
UnknownVariant64(u64)
UnknownVariant128(u128)
Io(Error)
Tungstenite(Error)
Available on crate features
tokio-tungstenite
or tungstenite
only.Utf8(FromUtf8Error)
Warp(Error)
Available on crate feature
warp
only.Trait Implementations§
source§impl Debug for ReadErrorKind
impl Debug for ReadErrorKind
source§impl Display for ReadErrorKind
impl Display for ReadErrorKind
source§impl Error for ReadErrorKind
impl Error for ReadErrorKind
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<'a> From<&'a str> for ReadErrorKind
impl<'a> From<&'a str> for ReadErrorKind
source§impl From<Error> for ReadErrorKind
impl From<Error> for ReadErrorKind
source§impl From<Error> for ReadErrorKind
impl From<Error> for ReadErrorKind
source§impl From<Error> for ReadErrorKind
impl From<Error> for ReadErrorKind
source§impl From<FromUtf8Error> for ReadErrorKind
impl From<FromUtf8Error> for ReadErrorKind
source§fn from(source: FromUtf8Error) -> Self
fn from(source: FromUtf8Error) -> Self
Converts to this type from the input type.
source§impl From<Infallible> for ReadErrorKind
impl From<Infallible> for ReadErrorKind
source§fn from(never: Infallible) -> Self
fn from(never: Infallible) -> Self
Converts to this type from the input type.
source§impl From<ReadErrorKind> for Error
impl From<ReadErrorKind> for Error
source§fn from(e: ReadErrorKind) -> Self
fn from(e: ReadErrorKind) -> Self
Converts to this type from the input type.
source§impl From<String> for ReadErrorKind
impl From<String> for ReadErrorKind
source§impl From<TryFromIntError> for ReadErrorKind
impl From<TryFromIntError> for ReadErrorKind
source§fn from(source: TryFromIntError) -> Self
fn from(source: TryFromIntError) -> Self
Converts to this type from the input type.
source§impl From<TryReserveError> for ReadErrorKind
impl From<TryReserveError> for ReadErrorKind
source§fn from(e: TryReserveError) -> Self
fn from(e: TryReserveError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !Freeze for ReadErrorKind
impl !RefUnwindSafe for ReadErrorKind
impl Send for ReadErrorKind
impl Sync for ReadErrorKind
impl Unpin for ReadErrorKind
impl !UnwindSafe for ReadErrorKind
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