plain_binary_stream/
util.rs1use crate::binary_stream::BinaryStream;
2
3pub trait PacketType : Sized {
4 fn to_byte(&self) -> u8;
5 fn from_byte(byte: u8) -> Option<Self>;
6}
7
8pub trait Serializable {
9 fn to_stream(&self, stream: &mut BinaryStream);
10 fn from_stream(stream: &mut BinaryStream) -> Self;
11}