pub enum ProcessError {
MissingRequest(usize),
CannotDeserializeResponse(usize, Error),
CannotDeserializeNotification {
method: CowStr,
params: Value,
error: Error,
},
}
Expand description
An error that occurred while processing an incoming server response or notification.
Variants§
MissingRequest(usize)
A response was received for an unknown or untracked request ID.
CannotDeserializeResponse(usize, Error)
The server returned a successful response, but it could not be deserialized into the expected type.
The usize
is the request ID, and the serde_json::Error
is the underlying deserialization
failure.
CannotDeserializeNotification
A server notification could not be deserialized into the expected notification type.
This may happen if the notification method is unknown or its parameters are malformed.
The method
and params
are the raw JSON-RPC fields from the server, and error
is the
deserialization failure.
Trait Implementations§
Source§impl Debug for ProcessError
impl Debug for ProcessError
Source§impl Display for ProcessError
impl Display for ProcessError
Source§impl Error for ProcessError
impl Error for ProcessError
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()
Auto Trait Implementations§
impl Freeze for ProcessError
impl !RefUnwindSafe for ProcessError
impl Send for ProcessError
impl Sync for ProcessError
impl Unpin for ProcessError
impl !UnwindSafe for ProcessError
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