pub enum Error<E> {
UnexpectedEof,
IO(E),
Protocol(ProtocolError),
ServerDisconnect(DisconnectReason),
ClientDisconnect(DisconnectReason),
}Expand description
Set of possible transport errors.
Variants§
UnexpectedEof
The transport’s stream reached EOF unexpectedly.
IO(E)
The transport’s stream encountered an I/O error.
Protocol(ProtocolError)
The transport encountered a fatal protocol error.
ServerDisconnect(DisconnectReason)
The server ended communication by disconnecting.
ClientDisconnect(DisconnectReason)
The client ended communication by disconnecting.
Trait Implementations§
Source§impl<E> From<ProtocolError> for Error<E>
impl<E> From<ProtocolError> for Error<E>
Source§fn from(value: ProtocolError) -> Self
fn from(value: ProtocolError) -> Self
Converts to this type from the input type.
Source§impl<E: Error> From<ReadExactError<E>> for Error<E>
impl<E: Error> From<ReadExactError<E>> for Error<E>
Source§fn from(value: ReadExactError<E>) -> Self
fn from(value: ReadExactError<E>) -> Self
Converts to this type from the input type.
impl<E: Copy> Copy for Error<E>
impl<E: Eq> Eq for Error<E>
impl<E> StructuralPartialEq for Error<E>
Auto Trait Implementations§
impl<E> Freeze for Error<E>where
E: Freeze,
impl<E> RefUnwindSafe for Error<E>where
E: RefUnwindSafe,
impl<E> Send for Error<E>where
E: Send,
impl<E> Sync for Error<E>where
E: Sync,
impl<E> Unpin for Error<E>where
E: Unpin,
impl<E> UnwindSafe for Error<E>where
E: UnwindSafe,
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