Skip to main content

Module protocol

Module protocol 

Source
Expand description

JSON-RPC 2.0 wire types.

Each method handler receives an RpcRequest (params extracted by the caller into a typed Value) and returns either an RpcResponse::Ok with a JSON result or RpcResponse::Err with a structured crate::error::RpcError.

Spec: https://www.jsonrpc.org/specification

The transport framing (length-prefixed JSON, newline-delimited JSON, etc.) is layered on top by the server loop — this module only concerns itself with the payload shape.

Structs§

AuditNotification
Notification pushed to audit subscribers. The wire shape mirrors audit::event::AuditEvent::to_json so subscribers can read both audit messages and the daemon’s own RpcRequest messages from the same stream.
AuditParams
RpcErrorBody
RpcErrorPayload
The body of a JSON-RPC error reply. Serializes as {"code": ..., "message": "..."} per the spec.
RpcRequest
JSON-RPC 2.0 request object.
RpcSuccess

Enums§

RpcResponse
JSON-RPC 2.0 response object.