Trait bancho_packets::BanchoPacketLength
source · pub trait BanchoPacketLength {
// Provided method
fn packet_len(&self) -> usize { ... }
}Expand description
BanchoPacketLength is a trait used to calculate the byte length of the data converted to bancho packet.
Provided Methods§
sourcefn packet_len(&self) -> usize
fn packet_len(&self) -> usize
Calculate the byte length of self after being converted into a bancho packet,
which is used to allocate Vec space in advance to improve performance.
If not implemented, return 0.