Struct pdu::GrePdu[][src]

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

Represents a GRE header and payload

Implementations

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

pub fn new(buffer: &'a [u8]) -> Result<Self>[src]

Constructs a GrePdu backed by the provided buffer

pub fn buffer(&'a self) -> &'a [u8][src]

Returns a reference to the entire underlying buffer that was provided during construction

pub fn as_bytes(&'a self) -> &'a [u8][src]

Returns the slice of the underlying buffer that contains the header part of this PDU

pub fn inner(&'a self) -> Result<Gre<'a>>[src]

Returns an object representing the inner payload of this PDU

pub fn into_inner(self) -> Result<Gre<'a>>[src]

Consumes this object and returns an object representing the inner payload of this PDU

pub fn computed_ihl(&'a self) -> usize[src]

pub fn version(&'a self) -> u8[src]

pub fn ethertype(&'a self) -> u16[src]

pub fn has_checksum(&'a self) -> bool[src]

pub fn has_key(&'a self) -> bool[src]

pub fn has_sequence_number(&'a self) -> bool[src]

pub fn checksum(&'a self) -> Option<u16>[src]

pub fn computed_checksum(&'a self) -> Option<u16>[src]

pub fn key(&'a self) -> Option<u32>[src]

pub fn sequence_number(&'a self) -> Option<u32>[src]

Trait Implementations

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

impl<'a> Copy for GrePdu<'a>[src]

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

Auto Trait Implementations

impl<'a> RefUnwindSafe for GrePdu<'a>

impl<'a> Send for GrePdu<'a>

impl<'a> Sync for GrePdu<'a>

impl<'a> Unpin for GrePdu<'a>

impl<'a> UnwindSafe for GrePdu<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.