Module admin

Source
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§

AdminRead
Provides the function AdminRead::read_packet. It is implemented for any type implementing std::io::Read via PacketRead.
AdminWrite
Provides the function AdminWrite::write_packet to a type implementing std::io::Write.