pub struct ExtensionsPacket<'a> { /* private fields */ }Expand description
Represents an ICMP ExtensionsPacket pseudo object.
The internal representation is held in network byte order (big-endian) and all accessor methods take and return data in host byte order, converting as necessary for the given architecture.
Implementations§
Source§impl<'a> ExtensionsPacket<'a>
impl<'a> ExtensionsPacket<'a>
pub fn new(packet: &'a mut [u8]) -> Result<Self>
pub fn new_view(packet: &'a [u8]) -> Result<Self>
pub const fn minimum_packet_size() -> usize
pub fn packet(&self) -> &[u8] ⓘ
pub fn header(&self) -> &[u8] ⓘ
Sourcepub const fn objects(&self) -> ExtensionObjectIter<'_> ⓘ
pub const fn objects(&self) -> ExtensionObjectIter<'_> ⓘ
An iterator of Extension Objects contained within this ExtensionsPacket.
Auto Trait Implementations§
impl<'a> Freeze for ExtensionsPacket<'a>
impl<'a> RefUnwindSafe for ExtensionsPacket<'a>
impl<'a> Send for ExtensionsPacket<'a>
impl<'a> Sync for ExtensionsPacket<'a>
impl<'a> Unpin for ExtensionsPacket<'a>
impl<'a> !UnwindSafe for ExtensionsPacket<'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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more