pub struct Response {
pub jsonrpc: String,
pub id: Option<Value>,
pub result: Option<Value>,
pub error: Option<Error>,
}
Expand description
Response represents a JSON-RPC response message. It includes the JSON-RPC version, an identifier matching the request, the result of the request, and an optional error.
Fields§
§jsonrpc: String
JSON-RPC version, typically “2.0”.
id: Option<Value>
Unique identifier for the request, can be a number or a string.
result: Option<Value>
Result of the request if it was successful.
error: Option<Error>
Error object if the request failed.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Response
impl<'de> Deserialize<'de> for Response
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
Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
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