Skip to main content

Crate wire

Crate wire 

Source
Expand description

Wire framing and packet layout for the sdec codec.

This crate handles the binary wire format: packet headers, section framing, and limit enforcement. It does not know about game state types—only the structure of packets.

§Design Principles

  • Stable wire format - The format is versioned and changes are documented.
  • Bounded decoding - All length fields are validated against limits before iteration.
  • No domain knowledge - This crate handles framing, not game logic.

See WIRE_FORMAT.md for the complete specification.

Structs§

Limits
Limits for packet decoding.
PacketFlags
Packet flags.
PacketHeader
Packet header (v0).

Enums§

WireError
Errors that can occur during wire format encoding/decoding.

Constants§

HEADER_SIZE
Header size in bytes (28 total).
MAGIC
Magic number identifying sdec packets.
VERSION
Current wire format version.

Type Aliases§

WireResult
Result type for wire format operations.