pub trait PacketVariable {
// Required methods
fn from_packet(bytes: Vec<u8>) -> (Self, usize)
where Self: Sized;
fn to_packet(&self) -> Vec<u8> ⓘ;
}
Required Methods§
Sourcefn from_packet(bytes: Vec<u8>) -> (Self, usize)where
Self: Sized,
fn from_packet(bytes: Vec<u8>) -> (Self, usize)where
Self: Sized,
Reads a variable from the beginning of the given bytes vector