Crate xi_rpc

Source
Expand description

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§

Structs§

  • An interface to access the other side of the RPC channel. The main purpose is to send RPC requests and notifications to the peer.
  • An RPC command.
  • A structure holding the state of a main loop for handling RPC’s.

Enums§

  • The possible error outcomes when attempting to send a message.
  • The possible error outcomes when attempting to read a message.
  • Errors that can be received from the other side of the RPC channel.

Traits§

  • A trait for types which can handle RPCs.
  • 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 Aliases§