Expand description
Request/response wire types shared by every Turnbase client and host.
The envelope is typed: Request<A> carries a game’s action and
Response<V> carries a seat’s view, rather than opaque bytes. This keeps
the in-process and file-backed paths serialization-free and type-safe, and
lets a real transport serialize the whole envelope in one clean pass (no
bytes-inside-JSON double-encoding).
These types are generic over the action and view types, not over
turnbase::Game, so this crate has no dependency on turnbase and one
definition serves every game. If a future remote transport ever needs to
move messages without knowing the concrete types (a universal host, a
polyglot bus), that erasure belongs inside the transport, not here: the
port stays typed.
Enums§
- Request
- A message from a client to whichever process holds the authoritative state.
- Response
- A message back to the client.
Vis a game’sViewtype.
Constants§
- PROTOCOL_
VERSION - Wire-format version, bumped on any breaking change to a type in this crate.