Struct etherparse::SlicedPacket[][src]

pub struct SlicedPacket<'a> {
    pub link: Option<LinkSlice<'a>>,
    pub vlan: Option<VlanSlice<'a>>,
    pub ip: Option<InternetSlice<'a>>,
    pub transport: Option<TransportSlice<'a>>,
    pub payload: &'a [u8],
}

Fields

The payload field points to the rest of the packet that could not be parsed by etherparse.

Depending on what other fields contain a "Some" values the payload contains the corresponding payload.

For example if transport field contains Some(Udp(_)) then the payload field points to the udp payload. On the other hand if the transport field contains None then the payload contains the payload of next field containing a Some value (in order of transport, ip, vlan, link).

Methods

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

Trait Implementations

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

Formats the value using the given formatter. Read more

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

impl<'a> PartialEq for SlicedPacket<'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 SlicedPacket<'a>

impl<'a> Sync for SlicedPacket<'a>