pub enum Error {
Io(Error),
RemoteError(RemoteError),
PeerDisconnect,
InvalidResponse,
}
Expand description
The possible error outcomes when attempting to send a message.
Variants§
Io(Error)
An IO error occurred on the underlying communication channel.
RemoteError(RemoteError)
The peer returned an error.
PeerDisconnect
The peer closed the connection.
InvalidResponse
The peer sent a response containing the id, but was malformed.
Trait Implementations§
Source§impl From<RemoteError> for Error
impl From<RemoteError> for Error
Source§fn from(err: RemoteError) -> Error
fn from(err: RemoteError) -> Error
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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