cmdproto
cmdproto contains protobuf message definitions and Rust helpers for a WebSocket command protocol.
The crate exposes generated protobuf types, command IDs, and small encode/decode helpers for the two packet directions:
PacketTos: client to serverPacketToc: server to client, witherror_code
Usage
use ;
let req = M1001Tos ;
let bytes = encode_tos?;
let packet = decode_packet_tos?;
let decoded: M1001Tos = decode_payload?;
assert_eq!;
# Ok::
Protocol Layout
The protobuf schemas are included in the crate under proto/ and compiled at build time with prost-build.
Consumers of this Rust crate do not need to copy the .proto files or add their own build.rs.
License
MIT