pub trait Packet: Send + Sync + Sized {
    fn get_address(&self) -> u32;
    fn get_data(&self) -> &[u8]Notable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8];
    fn set_address(&mut self, address: u32);
    fn set_data(&mut self, data: &[u8]);
}
Expand description

This trait is for packets that are used by PacketChannel

Required Methods

Returns the address of the packet

Returns the data of the packet

Sets the address of the packet

Sets the data of the packet

Implementors