pub struct Icmpv6MessageMut<'a> { /* private fields */ }Expand description
A mutable structurally validated ICMPv6 message.
Implementations§
Source§impl Icmpv6MessageMut<'_>
impl Icmpv6MessageMut<'_>
Sourcepub fn checksum_is_valid_ipv6(
&self,
source: Ipv6Address,
destination: Ipv6Address,
) -> Result<bool, Icmpv6ChecksumError>
pub fn checksum_is_valid_ipv6( &self, source: Ipv6Address, destination: Ipv6Address, ) -> Result<bool, Icmpv6ChecksumError>
Checks this ICMPv6 message against its IPv6 pseudoheader.
Sourcepub fn update_checksum_ipv6(
&mut self,
source: Ipv6Address,
destination: Ipv6Address,
) -> Result<(), Icmpv6ChecksumError>
pub fn update_checksum_ipv6( &mut self, source: Ipv6Address, destination: Ipv6Address, ) -> Result<(), Icmpv6ChecksumError>
Recomputes the ICMPv6 checksum using the supplied IPv6 pseudoheader.
Source§impl<'a> Icmpv6MessageMut<'a>
impl<'a> Icmpv6MessageMut<'a>
Sourcepub fn parse(bytes: &'a mut [u8]) -> Result<Self, ParseError>
pub fn parse(bytes: &'a mut [u8]) -> Result<Self, ParseError>
Parses a complete ICMPv6 message without checking its checksum.
Sourcepub fn message_type(&self) -> Icmpv6Type
pub fn message_type(&self) -> Icmpv6Type
Returns the message type.
Sourcepub fn body_mut(&mut self) -> &mut [u8] ⓘ
pub fn body_mut(&mut self) -> &mut [u8] ⓘ
Returns mutable body bytes without updating the checksum.
Sourcepub fn as_bytes_mut(&mut self) -> &mut [u8] ⓘ
pub fn as_bytes_mut(&mut self) -> &mut [u8] ⓘ
Returns all represented message bytes mutably without updating the checksum.
Sourcepub fn set_message_type(&mut self, value: Icmpv6Type)
pub fn set_message_type(&mut self, value: Icmpv6Type)
Replaces the message type without updating the checksum.
Sourcepub fn set_checksum(&mut self, value: u16)
pub fn set_checksum(&mut self, value: u16)
Replaces the encoded checksum directly.
Trait Implementations§
Source§impl<'a> Debug for Icmpv6MessageMut<'a>
impl<'a> Debug for Icmpv6MessageMut<'a>
impl<'a> Eq for Icmpv6MessageMut<'a>
Source§impl<'a> PartialEq for Icmpv6MessageMut<'a>
impl<'a> PartialEq for Icmpv6MessageMut<'a>
impl<'a> StructuralPartialEq for Icmpv6MessageMut<'a>
Auto Trait Implementations§
impl<'a> !UnwindSafe for Icmpv6MessageMut<'a>
impl<'a> Freeze for Icmpv6MessageMut<'a>
impl<'a> RefUnwindSafe for Icmpv6MessageMut<'a>
impl<'a> Send for Icmpv6MessageMut<'a>
impl<'a> Sync for Icmpv6MessageMut<'a>
impl<'a> Unpin for Icmpv6MessageMut<'a>
impl<'a> UnsafeUnpin for Icmpv6MessageMut<'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