pub struct ICMP6Header {
pub code: u8,
pub cksum: u16,
pub options: ICMP6HeaderOptions,
pub len: u16,
}
Expand description
A struct representing an ICMPv6 header.
Fields§
§code: u8
§cksum: u16
§options: ICMP6HeaderOptions
§len: u16
Implementations§
Source§impl ICMP6Header
impl ICMP6Header
pub fn new(icmp_type: ICMP6Type) -> ICMP6Header
pub fn set_type(&mut self, icmp_type: ICMP6Type)
pub fn set_code(&mut self, code: u8)
pub fn set_cksum(&mut self, cksum: u16)
pub fn set_options(&mut self, options: ICMP6HeaderOptions)
pub fn set_len(&mut self, len: u16)
pub fn get_type(&self) -> ICMP6Type
pub fn get_type_as_int(&self) -> u8
pub fn get_code(&self) -> u8
pub fn get_cksum(&self) -> u16
pub fn get_options(&self) -> ICMP6HeaderOptions
pub fn get_len(&self) -> u16
pub fn get_hdr_size(&self) -> usize
Trait Implementations§
Source§impl Clone for ICMP6Header
impl Clone for ICMP6Header
Source§fn clone(&self) -> ICMP6Header
fn clone(&self) -> ICMP6Header
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 moreimpl Copy for ICMP6Header
Auto Trait Implementations§
impl Freeze for ICMP6Header
impl RefUnwindSafe for ICMP6Header
impl Send for ICMP6Header
impl Sync for ICMP6Header
impl Unpin for ICMP6Header
impl UnwindSafe for ICMP6Header
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