Expand description
The two contract traits: the client-facing call builder/parser and the node-facing handler.
ControlCallbinds a typed params struct to itsControlMethodand its typed result — so a caller writesclient.request(&SetCapParams { cap_bytes })and gets back aSetCapResult, never a stringly-typedValue.ControlClientis what a CLIENT depends on: build a JSON-RPC request from a typed call, and parse a response back into the typed result (or aControlError). Pure — no transport; the consumer carries the bytes over dig-ipc / loopback-mTLS itself.ControlHandleris what a NODE implements to SERVE the surface: one typed method per control method, plus a provideddispatchthat routes a raw request to the right method — the single anti-drift seam the conformance KATs exercise.
Structs§
- Default
Control Client - The standard, zero-configuration
ControlClientusing the default request/response behaviour.
Traits§
- Control
Call - A typed control call: a params struct that knows its
ControlMethodand its result type. - Control
Client - The client-facing half of the contract: turn typed calls into requests and responses back into typed results.
- Control
Handler - The node-facing half of the contract: a running node implements this to SERVE the control
surface. Each method is typed to the catalog’s params/results; the provided
dispatchroutes a rawJsonRpcRequestto the right method so a server needs only one entry point and can never mis-route.
Functions§
- build_
request - Build the JSON-RPC request envelope for a typed control call. Pure.
- parse_
response - Parse a JSON-RPC response into a typed result, or the
ControlErrorit carried. Pure.