Trait g_rust::protocol::vars::packetvariable::PacketVariable
source · 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