Expand description
Provides API for communicating with the OpenTTD admin interface. To read
packets, import AdminRead
, which provides read_packet
.
To write packets, import AdminWrite
, which provides write_packet
.
The packets themselves are defined in the submodules client_packets
and
server_packets
.
Re-exports§
pub use crate::packet::serde::PacketRead;
pub use crate::packet::serde::PacketWrite;
pub use crate::packet::serde::Result;
Modules§
- client_
packets - This module contains the definitions for the admin packets that can be sent to the server.
- server_
packets - This module contains the definitions for the admin packets that can be
sent by the server. All different types of packets are contained in the
enum
Packet
. Packets that contain extra information also have their own struct.
Traits§
- Admin
Read - Provides the function
AdminRead::read_packet
. It is implemented for any type implementing std::io::Read via PacketRead. - Admin
Write - Provides the function
AdminWrite::write_packet
to a type implementingstd::io::Write
.