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§