Enum etherparse::NetSlice
source · pub enum NetSlice<'a> {
Ipv4(Ipv4Slice<'a>),
Ipv6(Ipv6Slice<'a>),
}
Expand description
Slice containing the network headers & payloads (e.g. IPv4, IPv6, ARP).
Variants§
Ipv4(Ipv4Slice<'a>)
The ipv4 header & the decoded extension headers.
Ipv6(Ipv6Slice<'a>)
The ipv6 header & the decoded extension headers.
Implementations§
source§impl<'a> NetSlice<'a>
impl<'a> NetSlice<'a>
sourcepub fn ip_payload_ref(&self) -> Option<&IpPayloadSlice<'a>>
pub fn ip_payload_ref(&self) -> Option<&IpPayloadSlice<'a>>
Returns a reference to ip payload if the net slice contains an ipv4 or ipv6 slice.
Trait Implementations§
source§impl<'a> PartialEq for NetSlice<'a>
impl<'a> PartialEq for NetSlice<'a>
impl<'a> Eq for NetSlice<'a>
impl<'a> StructuralPartialEq for NetSlice<'a>
Auto Trait Implementations§
impl<'a> Freeze for NetSlice<'a>
impl<'a> RefUnwindSafe for NetSlice<'a>
impl<'a> Send for NetSlice<'a>
impl<'a> Sync for NetSlice<'a>
impl<'a> Unpin for NetSlice<'a>
impl<'a> UnwindSafe for NetSlice<'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