Trait discortp::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 for &Twhere T: Packet,

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 for Box<T>where T: Packet,

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§