pub trait BanchoPacketWrite {
    // Required method
    fn write_into_buf(self, buf: &mut Vec<u8>);

    // Provided method
    fn into_packet(self) -> Vec<u8> 
       where Self: Sized { ... }
}
Expand description

BanchoPacketWrite is a trait used to convert rust internal data types to bancho packets (Vec<u8>).

Required Methods§

source

fn write_into_buf(self, buf: &mut Vec<u8>)

Convert self into a bancho packet and write it into buf Vec<u8>.

Provided Methods§

source

fn into_packet(self) -> Vec<u8> where Self: Sized,

Convert self into a bancho packet Vec<u8>.

Implementations on Foreign Types§

source§

impl BanchoPacketWrite for &[u64]

source§

fn write_into_buf(self, buf: &mut Vec<u8>)

source§

impl BanchoPacketWrite for i8

source§

fn write_into_buf(self, buf: &mut Vec<u8>)

source§

impl BanchoPacketWrite for Vec<u64>

source§

fn write_into_buf(self, buf: &mut Vec<u8>)

source§

impl BanchoPacketWrite for &[i32]

source§

fn write_into_buf(self, buf: &mut Vec<u8>)

source§

impl BanchoPacketWrite for Vec<i64>

source§

fn write_into_buf(self, buf: &mut Vec<u8>)

source§

impl BanchoPacketWrite for i32

source§

fn write_into_buf(self, buf: &mut Vec<u8>)

source§

impl BanchoPacketWrite for i64

source§

fn write_into_buf(self, buf: &mut Vec<u8>)

source§

impl BanchoPacketWrite for &str

source§

fn write_into_buf(self, buf: &mut Vec<u8>)

source§

impl BanchoPacketWrite for Cow<'_, str>

source§

fn write_into_buf(self, buf: &mut Vec<u8>)

source§

impl BanchoPacketWrite for u16

source§

fn write_into_buf(self, buf: &mut Vec<u8>)

source§

impl BanchoPacketWrite for Vec<f32>

source§

fn write_into_buf(self, buf: &mut Vec<u8>)

source§

impl BanchoPacketWrite for Vec<f64>

source§

fn write_into_buf(self, buf: &mut Vec<u8>)

source§

impl BanchoPacketWrite for u32

source§

fn write_into_buf(self, buf: &mut Vec<u8>)

source§

impl BanchoPacketWrite for &[u32]

source§

fn write_into_buf(self, buf: &mut Vec<u8>)

source§

impl BanchoPacketWrite for &[i8]

source§

fn write_into_buf(self, buf: &mut Vec<u8>)

source§

impl BanchoPacketWrite for &[i16]

source§

fn write_into_buf(self, buf: &mut Vec<u8>)

source§

impl BanchoPacketWrite for &[i64]

source§

fn write_into_buf(self, buf: &mut Vec<u8>)

source§

impl BanchoPacketWrite for &[u8]

source§

fn write_into_buf(self, buf: &mut Vec<u8>)

source§

impl BanchoPacketWrite for i16

source§

fn write_into_buf(self, buf: &mut Vec<u8>)

source§

impl BanchoPacketWrite for Vec<u32>

source§

fn write_into_buf(self, buf: &mut Vec<u8>)

source§

impl BanchoPacketWrite for u64

source§

fn write_into_buf(self, buf: &mut Vec<u8>)

source§

impl BanchoPacketWrite for &[u16]

source§

fn write_into_buf(self, buf: &mut Vec<u8>)

source§

impl BanchoPacketWrite for &[f64]

source§

fn write_into_buf(self, buf: &mut Vec<u8>)

source§

impl BanchoPacketWrite for Vec<u16>

source§

fn write_into_buf(self, buf: &mut Vec<u8>)

source§

impl BanchoPacketWrite for f64

source§

fn write_into_buf(self, buf: &mut Vec<u8>)

source§

impl BanchoPacketWrite for Vec<i16>

source§

fn write_into_buf(self, buf: &mut Vec<u8>)

source§

impl BanchoPacketWrite for Vec<i32>

source§

fn write_into_buf(self, buf: &mut Vec<u8>)

source§

impl BanchoPacketWrite for bool

source§

fn write_into_buf(self, buf: &mut Vec<u8>)

source§

impl BanchoPacketWrite for &[f32]

source§

fn write_into_buf(self, buf: &mut Vec<u8>)

source§

impl BanchoPacketWrite for String

source§

fn write_into_buf(self, buf: &mut Vec<u8>)

source§

impl BanchoPacketWrite for Vec<u8>

source§

fn write_into_buf(self, buf: &mut Vec<u8>)

source§

impl BanchoPacketWrite for u8

source§

fn write_into_buf(self, buf: &mut Vec<u8>)

source§

impl BanchoPacketWrite for Vec<i8>

source§

fn write_into_buf(self, buf: &mut Vec<u8>)

source§

impl BanchoPacketWrite for f32

source§

fn write_into_buf(self, buf: &mut Vec<u8>)

Implementors§