Struct jsonrpc::jsonrpc_response::Response
[−]
[src]
pub struct Response { pub id: Id, pub result_or_error: ResponseResult, }
A JSON RPC response, version 2.0. Only one of 'result' or 'error' is defined.
Fields
id: Id
result_or_error: ResponseResult
Methods
impl Response
[src]
fn new_result(id: Id, result: Value) -> Response
fn new_error(id: Id, error: RequestError) -> Response
Trait Implementations
impl Debug for Response
[src]
impl PartialEq for Response
[src]
fn eq(&self, __arg_0: &Response) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Response) -> bool
This method tests for !=
.
impl Clone for Response
[src]
fn clone(&self) -> Response
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Serialize for Response
[src]
fn serialize<S>(&self, serializer: &mut S) -> Result<(), S::Error> where
S: Serializer,
S: Serializer,
Serializes this value into this serializer.
impl Deserialize for Response
[src]
fn deserialize<DE>(deserializer: &mut DE) -> Result<Self, DE::Error> where
DE: Deserializer,
DE: Deserializer,
Deserialize this value given this Deserializer
.