Expand description
Wire protocol message types and constants.
The codec is postcard over a length-prefixed framing layer (see
crate::frame). The on-wire format of a single message is:
u32 frame_len (little-endian; covers everything after this field)
u16 proto_version (little-endian)
[u8] postcard-encoded `Message`The Message enum’s variant discriminant is encoded by postcard as part of
the payload, so we don’t carry a separate msg_type byte on the wire.
Structs§
- Capabilities
- Reserved space for future feature negotiation flags.
- Handoff
Id - Opaque per-handoff identifier. Generated by the supervisor in
HelloAck.
Enums§
- Message
- One control-channel message. Variants correspond 1:1 to the rows of the
wire-protocol table in
ARCHITECTURE.md. - Side
- The role a peer announces in
Hello.
Constants§
- PROTO_
MAX - Maximum version this build can speak. Equal to
PROTO_MINuntil we ship a v2. - PROTO_
MIN - Minimum version this build can speak.
Functions§
- negotiate_
version - Negotiate a single protocol version from two
proto_min..=proto_maxranges. Returns the highest version both sides can speak, or [Error::VersionMismatch]. - short_
name - Short, stable name for a
Messagevariant. Used in error messages and tracing where the full payload is noise. The name is the variant identifier, nothing more — callers that want “unexpected for state X” framing should compose it at the call site.
Type Aliases§
- Proto
Version - Wire-protocol version. Bumped on any breaking payload change.