pub struct JsonrpcError {
pub error: JsonrpcErrorError,
pub id: RequestId,
/* private fields */
}
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
Implementations§
Source§impl JsonrpcError
impl JsonrpcError
Source§impl JsonrpcError
Constructs a new JsonrpcError using the provided arguments.
impl JsonrpcError
Constructs a new JsonrpcError using the provided arguments.
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 Display for JsonrpcError
Formats the ServerJsonrpcResponse as a JSON string.
impl Display for JsonrpcError
Formats the ServerJsonrpcResponse as a JSON string.
Source§impl From<JsonrpcError> for JsonrpcMessage
impl From<JsonrpcError> for JsonrpcMessage
Source§fn from(value: JsonrpcError) -> Self
fn from(value: JsonrpcError) -> Self
Converts to this type from the input type.
Source§impl FromStr for JsonrpcError
impl FromStr 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