Module jsonrpsee_types::jsonrpc[][src]

JSON-RPC 2.0 specification related types. Type definitions from the JSON-RPC specifications.

All these common implement the Serialize and Deserialize traits of the serde library and can be serialize/deserialized using the to_string/to_vec/from_slice methods.

Modules

wrapped

Wrappers on-top of plain serialize/deserialize types with additional convience methods.

Structs

Error

Error object as defined in Spec

Failure

Unsuccessful response

JsonMap

Represents a JSON key/value type.

JsonNumber

Represents a JSON number, whether integer or floating point.

MethodCall

Represents jsonrpc request which is a method call.

Notification

Represents jsonrpc request which is a notification.

ParseError

This type represents all possible errors that can occur when serializing or deserializing JSON data.

SubscriptionNotif

Server notification about something the client is subscribed to.

SubscriptionNotifParams

Field of a SubscriptionNotif.

Success

Successful response

Enums

Call

Represents single jsonrpc call.

ErrorCode

JSONRPC error code

Id

Request Id

JsonValue

Represents any valid JSON value.

Output

Represents output - failure or success

Params

Request parameters

Request

Represents jsonrpc request.

Response

JSONRPC response.

SubscriptionId

Id of a subscription, communicated by the server.

Version

Protocol version.

Traits

DeserializeOwned

A data structure that can be deserialized without borrowing any data from the deserializer.

Serialize

A data structure that can be serialized into any data format supported by Serde.

Functions

from_slice

Deserialize an instance of type T from bytes of JSON text.

from_value

Interpret a serde_json::Value as an instance of type T.

to_string

Serialize the given data structure as a String of JSON.

to_value

Convert a T into serde_json::Value which is an enum that can represent any valid JSON data.

to_vec

Serialize the given data structure as a JSON byte vector.