1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
//! This module provides all the logic around the packet, such as reading, parsing, and constructing headers. pub mod header; mod enums; mod outgoing; mod packet_reader; mod packet_structure; pub use self::enums::{DeliveryGuarantee, OrderingGuarantee, PacketType}; pub use self::outgoing::{Outgoing, OutgoingPacket, OutgoingPacketBuilder}; pub use self::packet_reader::PacketReader; pub use self::packet_structure::Packet; pub type SequenceNumber = u16; pub trait EnumConverter { type Enum; fn to_u8(&self) -> u8; fn from_u8(input: u8) -> Self::Enum; }