#[non_exhaustive]pub struct ErrorResponse {
pub jsonrpc: JsonRpcVersion,
pub id: Option<RequestId>,
pub error: ErrorObject,
}Expand description
An error response frame. Exactly one of result or error appears on a
response; this type is the error half.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.jsonrpc: JsonRpcVersionThe literal "2.0".
id: Option<RequestId>Echo of the request id; null only for an unrecoverable parse error
whose offending id could not be recovered. Always serialized, so None
renders as null rather than being omitted — required-but-nullable (see
[require_nullable_id]).
error: ErrorObjectThe error payload.
Trait Implementations§
Source§impl Clone for ErrorResponse
impl Clone for ErrorResponse
Source§impl Debug for ErrorResponse
impl Debug for ErrorResponse
Source§impl<'de> Deserialize<'de> for ErrorResponse
impl<'de> Deserialize<'de> for ErrorResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ErrorResponse
impl PartialEq for ErrorResponse
Source§impl Serialize for ErrorResponse
impl Serialize for ErrorResponse
impl StructuralPartialEq for ErrorResponse
Auto Trait Implementations§
impl Forget for ErrorResponse
impl Freeze for ErrorResponse
impl Move for ErrorResponse
impl RefUnwindSafe for ErrorResponse
impl Send for ErrorResponse
impl Sync for ErrorResponse
impl Unpin for ErrorResponse
impl UnsafeUnpin for ErrorResponse
impl UnwindSafe for ErrorResponse
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