Module protocol

Module protocol 

Source
Expand description

Protocol types and constants mirrored from protocol.md and the TS package.

These are the source-of-truth structures for the Rust encoder/decoder. The ProtocolMessage enum aggregates all message variants.

Structs§

BatchId
8-byte batch ID for fragmenting. On the wire this is exactly 8 raw bytes.

Enums§

CrdtType
CRDT types supported by the wire format.
JoinErrorCode
Error codes for JoinError (0x02).
MessageType
Message type tags as defined in protocol.md
Permission
Permission returned by a successful JoinResponse.
ProtocolMessage
All protocol messages as a single enum. Each variant includes the common crdt magic and room_id as part of the struct fields.
UpdateErrorCode
Error codes for UpdateError (0x06).

Constants§

MAGIC
Reserved library magic string, aligned with the TypeScript library. Not part of the message envelope; included for parity.
MAX_MESSAGE_SIZE