Struct pdu::EthernetPdu [−][src]
Represents an Ethernet header and payload
Implementations
impl<'a> EthernetPdu<'a>
[src]
pub fn new(buffer: &'a [u8]) -> Result<Self>
[src]
Constructs an EthernetPdu
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<Ethernet<'a>>
[src]
Returns an object representing the inner payload of this PDU
pub fn into_inner(self) -> Result<Ethernet<'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 source_address(&'a self) -> [u8; 6]
[src]
pub fn destination_address(&'a self) -> [u8; 6]
[src]
pub fn tpid(&'a self) -> u16
[src]
pub fn ethertype(&'a self) -> u16
[src]
pub fn vlan(&'a self) -> Option<u16>
[src]
pub fn vlan_pcp(&'a self) -> Option<u8>
[src]
pub fn vlan_dei(&'a self) -> Option<bool>
[src]
Trait Implementations
impl<'a> Clone for EthernetPdu<'a>
[src]
fn clone(&self) -> EthernetPdu<'a>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Copy for EthernetPdu<'a>
[src]
impl<'a> Debug for EthernetPdu<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for EthernetPdu<'a>
impl<'a> Send for EthernetPdu<'a>
impl<'a> Sync for EthernetPdu<'a>
impl<'a> Unpin for EthernetPdu<'a>
impl<'a> UnwindSafe for EthernetPdu<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,