[][src]Crate xi_rpc

Generic RPC handling (used for both front end and plugin communication).

The RPC protocol is based on JSON-RPC, but with some modifications. Unlike JSON-RPC 2.0, requests and notifications are allowed in both directions, rather than imposing client and server roles. Further, the batch form is not supported.

Because these changes make the protocol not fully compliant with the spec, the "jsonrpc" member is omitted from request and response objects.

Modules

test_utils

Types and helpers used for testing.

Structs

RawPeer

An interface to access the other side of the RPC channel. The main purpose is to send RPC requests and notifications to the peer.

RpcCall

An RPC command.

RpcCtx
RpcLoop

A structure holding the state of a main loop for handling RPC's.

Enums

Error

The possible error outcomes when attempting to send a message.

ReadError

The possible error outcomes when attempting to read a message.

RemoteError

Errors that can be received from the other side of the RPC channel.

Traits

Callback
Handler

A trait for types which can handle RPCs.

Peer

The Peer trait represents the interface for the other side of the RPC channel. It is intended to be used behind a pointer, a trait object.

Type Definitions

RpcPeer

The Peer trait object.