pub struct Response {
pub result: Option<Box<RawValue>>,
pub error: Option<RpcError>,
pub id: Value,
pub jsonrpc: Option<String>,
}
Expand description
A JSONRPC response object
Fields
result: Option<Box<RawValue>>
A result if there is one, or null
error: Option<RpcError>
An error if there is one, or null
id: Value
Identifier for this Request, which should match that of the request
jsonrpc: Option<String>
jsonrpc field, MUST be “2.0”
Implementations
Extract the result from a response
Return the RPC error, if there was one, but do not check the result
Trait Implementations
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 RefUnwindSafe for Response
impl UnwindSafe for Response
Blanket Implementations
Mutably borrows from an owned value. Read more