Struct etherparse::Ethernet2HeaderSlice[][src]

pub struct Ethernet2HeaderSlice<'a> { /* fields omitted */ }

A slice containing an ethernet 2 header of a network package.

Methods

impl<'a> Ethernet2HeaderSlice<'a>
[src]

Creates a ethernet slice from an other slice.

Returns the slice containing the ethernet 2 header

Read the destination mac address

Read the source mac address

Read the ether_type field of the header (in system native byte order).

Decode all the fields and copy the results to a Ipv4Header struct

Trait Implementations

impl<'a> Clone for Ethernet2HeaderSlice<'a>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a> Debug for Ethernet2HeaderSlice<'a>
[src]

Formats the value using the given formatter. Read more

impl<'a> Eq for Ethernet2HeaderSlice<'a>
[src]

impl<'a> PartialEq for Ethernet2HeaderSlice<'a>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

impl<'a> Send for Ethernet2HeaderSlice<'a>

impl<'a> Sync for Ethernet2HeaderSlice<'a>