Enum etherparse::LinkSlice
source · pub enum LinkSlice<'a> {
Ethernet2(Ethernet2Slice<'a>),
LinuxSll(LinuxSllSlice<'a>),
EtherPayload(EtherPayloadSlice<'a>),
LinuxSllPayload(LinuxSllPayloadSlice<'a>),
}
Expand description
A slice containing the link layer header (currently only Ethernet II and SLL are supported).
Variants§
Ethernet2(Ethernet2Slice<'a>)
A slice containing an Ethernet II header.
LinuxSll(LinuxSllSlice<'a>)
A slice containing a Linux Cooked Capture v1 (SLL) header.
EtherPayload(EtherPayloadSlice<'a>)
Ether payload without header.
LinuxSllPayload(LinuxSllPayloadSlice<'a>)
Sll payload without header.
Implementations§
source§impl<'a> LinkSlice<'a>
impl<'a> LinkSlice<'a>
sourcepub fn to_header(&self) -> Option<LinkHeader>
pub fn to_header(&self) -> Option<LinkHeader>
Convert the link slice to a header
sourcepub fn ether_payload(&self) -> Option<EtherPayloadSlice<'a>>
pub fn ether_payload(&self) -> Option<EtherPayloadSlice<'a>>
Returns the link layer ether payload (slice + ether type number).
sourcepub fn sll_payload(&self) -> LinuxSllPayloadSlice<'a>
pub fn sll_payload(&self) -> LinuxSllPayloadSlice<'a>
Returns the link layer sll payload (slice + link layer protocol type).
Trait Implementations§
source§impl<'a> PartialEq for LinkSlice<'a>
impl<'a> PartialEq for LinkSlice<'a>
impl<'a> Eq for LinkSlice<'a>
impl<'a> StructuralPartialEq for LinkSlice<'a>
Auto Trait Implementations§
impl<'a> Freeze for LinkSlice<'a>
impl<'a> RefUnwindSafe for LinkSlice<'a>
impl<'a> Send for LinkSlice<'a>
impl<'a> Sync for LinkSlice<'a>
impl<'a> Unpin for LinkSlice<'a>
impl<'a> UnwindSafe for LinkSlice<'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