Expand description
JSON/RPC wire protocol — line-delimited JSON encoding of the existing
UiEvent (out) and Command (in) enums. See docs/json.md and
docs/rpc.md.
Structs§
- Protocol
Error - A failure to decode a client command line.
- Session
Header - The first line emitted on any JSON/RPC stream.
Constants§
- PROTOCOL_
VERSION - Bumped when the wire schema changes incompatibly.
Functions§
- decode_
command - Decode one JSONL line into a
Command. - encode_
event - Encode one
UiEventas a single JSON object (no trailing newline — the stream writer adds\n). Encoding cannot realistically fail for our derivedSerialize; if it ever does, fall back to anerrorline so the stream stays valid JSONL. - serialize_
branch_ tree #[serde(serialize_with = "…")]target forUiEvent::BranchTree’s payload — motosan’sBranchTree/BranchNodeare notSerialize, so map them into a local serializable shape.