pub trait Packet: Send + Sync + Sized {
    // Required methods
    fn get_address(&self) -> u32;
    fn get_data(&self) -> &[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§

source

fn get_address(&self) -> u32

Returns the address of the packet

source

fn get_data(&self) -> &[u8]

Returns the data of the packet

source

fn set_address(&mut self, address: u32)

Sets the address of the packet

source

fn set_data(&mut self, data: &[u8])

Sets the data of the packet

Object Safety§

This trait is not object safe.

Implementors§