pub struct JsonrpcError {
pub error: JsonrpcErrorError,
pub id: RequestId,
pub jsonrpc: String,
}
Expand description
A response to a request that indicates an error occurred.
JSON schema
{
"description": "A response to a request that indicates an error occurred.",
"type": "object",
"required": [
"error",
"id",
"jsonrpc"
],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"description": "The error type that occurred.",
"type": "integer"
},
"data": {
"description": "Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.)."
},
"message": {
"description": "A short description of the error. The message SHOULD be limited to a concise single sentence.",
"type": "string"
}
}
},
"id": {
"$ref": "#/definitions/RequestId"
},
"jsonrpc": {
"type": "string",
"const": "2.0"
}
}
}
Fields§
§error: JsonrpcErrorError
§id: RequestId
§jsonrpc: String
Trait Implementations§
Source§impl Clone for JsonrpcError
impl Clone for JsonrpcError
Source§fn clone(&self) -> JsonrpcError
fn clone(&self) -> JsonrpcError
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for JsonrpcError
impl Debug for JsonrpcError
Source§impl<'de> Deserialize<'de> for JsonrpcError
impl<'de> Deserialize<'de> for JsonrpcError
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 From<&JsonrpcError> for JsonrpcBatchResponseItem
impl From<&JsonrpcError> for JsonrpcBatchResponseItem
Source§fn from(value: &JsonrpcError) -> Self
fn from(value: &JsonrpcError) -> Self
Converts to this type from the input type.
Source§impl From<&JsonrpcError> for JsonrpcError
impl From<&JsonrpcError> for JsonrpcError
Source§fn from(value: &JsonrpcError) -> Self
fn from(value: &JsonrpcError) -> Self
Converts to this type from the input type.
Source§impl From<&JsonrpcError> for JsonrpcMessageSubtype5Item
impl From<&JsonrpcError> for JsonrpcMessageSubtype5Item
Source§fn from(value: &JsonrpcError) -> Self
fn from(value: &JsonrpcError) -> Self
Converts to this type from the input type.
Source§impl From<JsonrpcError> for JsonrpcBatchResponseItem
impl From<JsonrpcError> for JsonrpcBatchResponseItem
Source§fn from(value: JsonrpcError) -> Self
fn from(value: JsonrpcError) -> Self
Converts to this type from the input type.
Source§impl From<JsonrpcError> for JsonrpcMessageSubtype5Item
impl From<JsonrpcError> for JsonrpcMessageSubtype5Item
Source§fn from(value: JsonrpcError) -> Self
fn from(value: JsonrpcError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for JsonrpcError
impl PartialEq for JsonrpcError
Source§impl Serialize for JsonrpcError
impl Serialize for JsonrpcError
impl StructuralPartialEq for JsonrpcError
Auto Trait Implementations§
impl Freeze for JsonrpcError
impl RefUnwindSafe for JsonrpcError
impl Send for JsonrpcError
impl Sync for JsonrpcError
impl Unpin for JsonrpcError
impl UnwindSafe for JsonrpcError
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