pub enum Error {
Json(Error),
Hyper(Error),
Rpc(RpcError),
_NonceMismatch,
_VersionMismatch,
_EmptyBatch,
_WrongBatchResponseSize,
_BatchDuplicateResponseId(Value),
_WrongBatchResponseId(Value),
}
Expand description
A library error
Variants§
Json(Error)
Json error
Hyper(Error)
Client error
Rpc(RpcError)
Error response
_NonceMismatch
Response to a request did not have the expected nonce
_VersionMismatch
Response to a request had a jsonrpc field other than “2.0”
_EmptyBatch
Batches can’t be empty
_WrongBatchResponseSize
Too many responses returned in batch
_BatchDuplicateResponseId(Value)
Batch response contained a duplicate ID
_WrongBatchResponseId(Value)
Batch response contained an ID that didn’t correspond to any request ID
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
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
Source§impl<E> Fail for E
impl<E> Fail for E
Source§fn cause(&self) -> Option<&(dyn Fail + 'static)>
fn cause(&self) -> Option<&(dyn Fail + 'static)>
Returns a reference to the underlying cause of this failure, if it
is an error that wraps other errors. Read more
Source§fn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
Returns a reference to the
Backtrace
carried by this failure, if it
carries one. Read more