Skip to main content

Crate turul_rpc_jsonrpc

Crate turul_rpc_jsonrpc 

Source
Expand description

§turul-rpc-jsonrpc

JSON-RPC 2.0 codec and parser for turul-rpc. Provides incoming-message parsing, batch processing, and response helper constructors.

Most consumers should depend on the turul-rpc facade rather than this crate directly.

§JSON-RPC 2.0 batch support

Per JSON-RPC 2.0 §6, a request body may be an array of request objects. This crate implements batch parsing via parse_json_rpc_batch and surfaces the result as BatchOrSingle. The dispatcher in turul-rpc-server consumes this and runs the per-member handlers, suppressing notification responses per spec.

Re-exports§

pub use batch::BatchOrSingle;
pub use batch::parse_json_rpc_batch;
pub use dispatch::JsonRpcMessage;
pub use dispatch::JsonRpcMessageResult;
pub use dispatch::create_error_response;
pub use dispatch::create_success_response;
pub use dispatch::parse_json_rpc_message;
pub use dispatch::parse_json_rpc_messages;

Modules§

batch
JSON-RPC 2.0 §6 batch parsing.
dispatch
JSON-RPC 2.0 codec — parser, batch handling, response helpers.
frame
The bidirectional wire-message union.