pub struct JsonRpcResponse {
pub jsonrpc: String,
pub id: Value,
pub result: Option<Value>,
pub error: Option<JsonRpcError>,
}Expand description
A JSON-RPC 2.0 response.
Fields§
§jsonrpc: String§id: Value§result: Option<Value>§error: Option<JsonRpcError>Implementations§
Source§impl JsonRpcResponse
impl JsonRpcResponse
Sourcepub fn parse_error() -> Self
pub fn parse_error() -> Self
Create a parse error response (-32700).
Sourcepub fn method_not_found(id: Value) -> Self
pub fn method_not_found(id: Value) -> Self
Create a method not found error response (-32601).
Trait Implementations§
Source§impl Debug for JsonRpcResponse
impl Debug for JsonRpcResponse
Auto Trait Implementations§
impl Freeze for JsonRpcResponse
impl RefUnwindSafe for JsonRpcResponse
impl Send for JsonRpcResponse
impl Sync for JsonRpcResponse
impl Unpin for JsonRpcResponse
impl UnsafeUnpin for JsonRpcResponse
impl UnwindSafe for JsonRpcResponse
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