Enum jsonrpc_lite::JsonRPC [] [src]

pub enum JsonRPC {
    Request(Value),
    Notification(Value),
    Success(Value),
    Error(Value),
    ErrorRequst(Error),
}

JSON-RPC 2.0 Request object and Response object JSON-RPC 2.0 Specification.

Variants

Request object

Notification object

Success Response

Error Response

Error Request

Methods

impl JsonRPC
[src]

Creates a JSON-RPC 2.0 request object without params

Creates a JSON-RPC 2.0 request object with params

Creates a JSON-RPC 2.0 notification object without params

Creates a JSON-RPC 2.0 notification object with params

Creates a JSON-RPC 2.0 success response object

Creates a JSON-RPC 2.0 error response object

Parses JSON string to a array of JSON-RPC 2.0 object

Parses JSON value object to a JSON-RPC 2.0 object

Trait Implementations

impl Clone for JsonRPC
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for JsonRPC
[src]

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

This method tests for !=.

impl Debug for JsonRPC
[src]

Formats the value using the given formatter.

impl ToJson for JsonRPC
[src]

Converts a JSON-RPC 2.0 object to a JSON value