pub struct Icmpv6MessageBuilder<'a> { /* private fields */ }Expand description
Builds an ICMPv6 common header in caller-owned storage.
Implementations§
Source§impl<'a> Icmpv6MessageBuilder<'a>
impl<'a> Icmpv6MessageBuilder<'a>
Sourcepub fn new(buffer: &'a mut [u8], body_length: usize) -> Self
pub fn new(buffer: &'a mut [u8], body_length: usize) -> Self
Starts a builder for body_length bytes, which are left untouched.
Sourcepub fn message_type(self, value: Icmpv6Type) -> Self
pub fn message_type(self, value: Icmpv6Type) -> Self
Supplies the ICMPv6 message type.
Sourcepub fn build(self) -> Result<Icmpv6MessageMut<'a>, Icmpv6MessageBuildError>
pub fn build(self) -> Result<Icmpv6MessageMut<'a>, Icmpv6MessageBuildError>
Validates all inputs, then writes only the common header.
Body bytes and capacity beyond the requested message are preserved. On error, the whole caller-provided buffer is unchanged.
Auto Trait Implementations§
impl<'a> !UnwindSafe for Icmpv6MessageBuilder<'a>
impl<'a> Freeze for Icmpv6MessageBuilder<'a>
impl<'a> RefUnwindSafe for Icmpv6MessageBuilder<'a>
impl<'a> Send for Icmpv6MessageBuilder<'a>
impl<'a> Sync for Icmpv6MessageBuilder<'a>
impl<'a> Unpin for Icmpv6MessageBuilder<'a>
impl<'a> UnsafeUnpin for Icmpv6MessageBuilder<'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