Struct clightningrpc::Response[][src]

pub struct Response {
    pub result: Option<Json>,
    pub error: Option<RpcError>,
    pub id: Json,
    pub jsonrpc: Option<String>,
}

A JSONRPC response object

Fields

A result if there is one, or null

An error if there is one, or null

Identifier for this Request, which should match that of the request

jsonrpc field, MUST be "2.0"

Methods

impl Response
[src]

Extract the result from a response

Extract the result from a response, consuming the response

Return the RPC error, if there was one, but do not check the result

Returns whether or not the result field is empty

Trait Implementations

impl Debug for Response
[src]

Formats the value using the given formatter. Read more

impl Clone for Response
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Response
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

impl Send for Response

impl Sync for Response