Crate xi_rpc [] [src]

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.

Structs

RpcCtx
RpcLoop

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

RpcPeer

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

Enums

Error

Traits

Handler

Functions

arr_get_i64
arr_get_u64
dict_add_value

Convenience function for adding a key/value pair to a json object. This function does minimal error handling, and panics on bad input.

dict_get_string
dict_get_u64