libpacket_core

Trait FromPacket

Source
pub trait FromPacket: Packet {
    type T;

    // Required method
    fn from_packet(&self) -> Self::T;
}
Expand description

Used to convert on-the-wire packets to their #[packet] equivalent.

Required Associated Types§

Source

type T

The type of the packet to convert from.

Required Methods§

Source

fn from_packet(&self) -> Self::T

Converts a wire-format packet to #[packet] struct format.

Implementors§