Struct etherparse::IpPayloadSlice
source · pub struct IpPayloadSlice<'a> {
pub ip_number: IpNumber,
pub fragmented: bool,
pub len_source: LenSource,
pub payload: &'a [u8],
}
Expand description
Payload of an IP packet.
Fields§
§ip_number: IpNumber
Identifying content of the payload.
fragmented: bool
True if the payload is not complete and has been fragmented.
This can occur if the IPv4 incdicates that the payload has been fragmented or if there is an IPv6 fragmentation header indicating that the payload has been fragmented.
len_source: LenSource
Length field that was used to determine the length of the payload (e.g. IPv6 “payload_length” field).
payload: &'a [u8]
Payload
Trait Implementations§
source§impl<'a> Clone for IpPayloadSlice<'a>
impl<'a> Clone for IpPayloadSlice<'a>
source§fn clone(&self) -> IpPayloadSlice<'a>
fn clone(&self) -> IpPayloadSlice<'a>
Returns a copy 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 IpPayloadSlice<'a>
impl<'a> Debug for IpPayloadSlice<'a>
source§impl<'a> Hash for IpPayloadSlice<'a>
impl<'a> Hash for IpPayloadSlice<'a>
source§impl<'a> Ord for IpPayloadSlice<'a>
impl<'a> Ord for IpPayloadSlice<'a>
source§fn cmp(&self, other: &IpPayloadSlice<'a>) -> Ordering
fn cmp(&self, other: &IpPayloadSlice<'a>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<'a> PartialEq for IpPayloadSlice<'a>
impl<'a> PartialEq for IpPayloadSlice<'a>
source§fn eq(&self, other: &IpPayloadSlice<'a>) -> bool
fn eq(&self, other: &IpPayloadSlice<'a>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a> PartialOrd for IpPayloadSlice<'a>
impl<'a> PartialOrd for IpPayloadSlice<'a>
source§fn partial_cmp(&self, other: &IpPayloadSlice<'a>) -> Option<Ordering>
fn partial_cmp(&self, other: &IpPayloadSlice<'a>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<'a> Eq for IpPayloadSlice<'a>
impl<'a> StructuralPartialEq for IpPayloadSlice<'a>
Auto Trait Implementations§
impl<'a> Freeze for IpPayloadSlice<'a>
impl<'a> RefUnwindSafe for IpPayloadSlice<'a>
impl<'a> Send for IpPayloadSlice<'a>
impl<'a> Sync for IpPayloadSlice<'a>
impl<'a> Unpin for IpPayloadSlice<'a>
impl<'a> UnwindSafe for IpPayloadSlice<'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