Struct exonum_jsonrpc::Response [−][src]
A JSONRPC response object
Fields
result: Option<Value>
The Object that was returned by the invoked method. This must be null in case there was a error invoking the method
error: Option<Value>
An Error object if there was an error invoking the method. It must be null if there was no error
id: Value
This must be the same id as the request it is responding to
Methods
impl Response
[src]
impl Response
pub fn result<T>(&self) -> Result<T, Error> where
T: Deserialize<'de>,
[src]
pub fn result<T>(&self) -> Result<T, Error> where
T: Deserialize<'de>,
Extract the result from a response
pub fn into_result<T>(self) -> Result<T, Error> where
T: Deserialize<'de>,
[src]
pub fn into_result<T>(self) -> Result<T, Error> where
T: Deserialize<'de>,
Extract the result from a response, consuming the response
pub fn check_error(self) -> Result<(), Error>
[src]
pub fn check_error(self) -> Result<(), Error>
Return the RPC error, if there was one, but do not check the result
pub fn is_none(&self) -> bool
[src]
pub fn is_none(&self) -> bool
Returns whether or not the result
field is empty
Trait Implementations
impl Clone for Response
[src]
impl Clone for Response
fn clone(&self) -> Response
[src]
fn clone(&self) -> Response
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for Response
[src]
impl Debug for Response
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Response
[src]
impl PartialEq for Response