pub enum LinkExtSlice<'a> {
Vlan(SingleVlanSlice<'a>),
Macsec(MacsecSlice<'a>),
}
Expand description
A slice containing the link layer extension header (currently only Ethernet II and SLL are supported).
Variants§
Vlan(SingleVlanSlice<'a>)
Slice containing a VLAN header & payload.
Macsec(MacsecSlice<'a>)
Slice containing MACsec header & payload.
Implementations§
Source§impl<'a> LinkExtSlice<'a>
impl<'a> LinkExtSlice<'a>
Sourcepub fn header_len(&self) -> usize
pub fn header_len(&self) -> usize
Returns the header length of the link extension.
Sourcepub fn to_header(&self) -> LinkExtHeader
pub fn to_header(&self) -> LinkExtHeader
Convert the header part of the link extension into a LinkExtHeader
.
Sourcepub fn ether_payload(&self) -> Option<EtherPayloadSlice<'a>>
pub fn ether_payload(&self) -> Option<EtherPayloadSlice<'a>>
Return the payload of the link extensions.
Trait Implementations§
Source§impl<'a> Clone for LinkExtSlice<'a>
impl<'a> Clone for LinkExtSlice<'a>
Source§fn clone(&self) -> LinkExtSlice<'a>
fn clone(&self) -> LinkExtSlice<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for LinkExtSlice<'a>
impl<'a> Debug for LinkExtSlice<'a>
Source§impl<'a> PartialEq for LinkExtSlice<'a>
impl<'a> PartialEq for LinkExtSlice<'a>
impl<'a> Eq for LinkExtSlice<'a>
impl<'a> StructuralPartialEq for LinkExtSlice<'a>
Auto Trait Implementations§
impl<'a> Freeze for LinkExtSlice<'a>
impl<'a> RefUnwindSafe for LinkExtSlice<'a>
impl<'a> Send for LinkExtSlice<'a>
impl<'a> Sync for LinkExtSlice<'a>
impl<'a> Unpin for LinkExtSlice<'a>
impl<'a> UnwindSafe for LinkExtSlice<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more