pub enum ReadError {
Io(Error),
Json(Error),
NotObject,
UnknownRequest(Error),
Disconnect,
}
Expand description
The possible error outcomes when attempting to read a message.
Variants§
Io(Error)
An error occurred in the underlying stream
Json(Error)
The message was not valid JSON.
NotObject
The message was not a JSON object.
UnknownRequest(Error)
The the method and params were not recognized by the handler.
Disconnect
The peer closed the connection.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ReadError
impl !RefUnwindSafe for ReadError
impl Send for ReadError
impl Sync for ReadError
impl Unpin for ReadError
impl !UnwindSafe for ReadError
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