pub struct ExtensionObjectPacket<'a> { /* private fields */ }Expand description
Represents an ICMP ExtensionObjectPacket.
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> ExtensionObjectPacket<'a>
impl<'a> ExtensionObjectPacket<'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 set_length(&mut self, val: u16)
pub fn set_class_num(&mut self, val: ClassNum)
pub fn set_class_subtype(&mut self, val: ClassSubType)
pub fn set_payload(&mut self, vals: &[u8])
pub fn get_length(&self) -> u16
pub fn get_class_num(&self) -> ClassNum
pub fn get_class_subtype(&self) -> ClassSubType
pub fn packet(&self) -> &[u8] ⓘ
pub fn payload(&self) -> &[u8] ⓘ
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for ExtensionObjectPacket<'a>
impl<'a> RefUnwindSafe for ExtensionObjectPacket<'a>
impl<'a> Send for ExtensionObjectPacket<'a>
impl<'a> Sync for ExtensionObjectPacket<'a>
impl<'a> Unpin for ExtensionObjectPacket<'a>
impl<'a> !UnwindSafe for ExtensionObjectPacket<'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