pub enum Error<E> {
BatchDuplicateResponseId(Value),
Connection(E),
EmptyBatch,
Json(Error),
NonceMismatch,
VersionMismatch,
WrongBatchResponseId(Value),
WrongBatchResponseSize,
}
Expand description
The error type for RPCs.
Variants§
BatchDuplicateResponseId(Value)
The batch response contained a duplicate ID.
Connection(E)
A connection error occured.
EmptyBatch
Batches can’t be empty.
Json(Error)
An error occured during respnse JSON deserialization.
NonceMismatch
The response did not have the expected nonce.
VersionMismatch
The response had a jsonrpc field other than “2.0”.
WrongBatchResponseId(Value)
The batch response contained an ID that didn’t correspond to any request ID.
WrongBatchResponseSize
Too many responses returned in batch.
Trait Implementations§
Source§impl<E: Display + Debug> Error for Error<E>
impl<E: Display + Debug> Error for Error<E>
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<E> Freeze for Error<E>where
E: Freeze,
impl<E> !RefUnwindSafe for Error<E>
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>
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