Trait Packet

Source
pub trait Packet {
    // Required methods
    fn packet(&self) -> &[u8] ;
    fn payload(&self) -> &[u8] ;
}
Expand description

Represents a generic network packet.

Required Methods§

Source

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

Retrieve the underlying buffer for the packet.

Source

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

Retrieve the payload for the packet.

Implementations on Foreign Types§

Source§

impl<T: Packet> Packet for &T

Source§

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

Retrieve the underlying buffer for the packet.

Source§

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

Retrieve the payload for the packet.

Source§

impl<T: Packet> Packet for Box<T>

Blanket impl for Boxed objects

Source§

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

Retrieve the underlying buffer for the packet.

Source§

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

Retrieve the payload for the packet.

Implementors§