Crate airmash_protocol [−] [src]
THIS LIBRARY IS IN ALPHA! USE AT YOUR OWN RISK
This library contains definitions
and serialization/deserialization methods
for the protocol for the game
AIRMASH. It implements
serialization and deserialization and is
intended to be used for creating bots or
servers using this protocol.
Serialization and deserialization of packets
is simple on the caller's side. All that
must be done is to call
deserialize and to call
to_bytes to serialize.
structs will take care of decoding the message
type and message fields for you as well as
encoding them. If an invalid message is passed
then deserialize will return an error indicating
what went wrong. (Note: it will currently panic
in some cases. See TODOs). If an error occurse while
serializing, an error will be returned too.
(Note: will panic currently. See TODOs).
All protocol types are able to be serialized and
deserialized using serde. This is not enabled
by default, but can be enabled by turning on
"serde". Note that serde is not
required for regular use of the library.
Messages sent from client to server
Messages sent from server to client
All the errors that can occur when serializing or deserializing messages within the airmash protocol.
All the current flags present within the airmash server.
All the keys that are sent from the client to the server.
The current state of a key.
All plane types present within airmash.
Deserializes a struct from a byte buffer,
and returns an
Serializes a struct to a byte vector, returning