[][src]Trait packet_crafter::headers::Header

pub trait Header {
    fn make(self) -> PacketData;
fn parse(raw_data: &[u8]) -> Result<Box<Self>, ParseError>;
fn get_proto(&self) -> Protocol;
fn get_length(&self) -> u8;
fn get_min_length() -> u8; }

Required methods

fn make(self) -> PacketData

fn parse(raw_data: &[u8]) -> Result<Box<Self>, ParseError>

fn get_proto(&self) -> Protocol

fn get_length(&self) -> u8

fn get_min_length() -> u8

Loading content...

Implementations on Foreign Types

impl<T: Header> Header for Box<T>[src]

fn parse(raw_data: &[u8]) -> Result<Box<Self>, ParseError>[src]

parse() should never be run from a box

, is hould only ever br un as
::parse(). this is just here to complete the implementation of Header onto boxed structs that implement header

Loading content...

Implementors

impl Header for ArpHeader[src]

impl Header for EthernetHeader[src]

impl Header for IcmpHeader[src]

impl Header for IpHeader[src]

impl Header for TcpHeader[src]

Loading content...