pub struct MessageBuilder<'a> { /* private fields */ }
Expand description
A DHCPv6Message
builder.
DHCPv6 messages are serialized through packet::serialize::InnerPacketBuilder because it won’t encapsulate any other packets.
Implementations§
Source§impl<'a> MessageBuilder<'a>
impl<'a> MessageBuilder<'a>
Sourcepub fn new(
msg_type: MessageType,
transaction_id: [u8; 3],
options: &'a [DhcpOption<'a>],
) -> MessageBuilder<'a>
pub fn new( msg_type: MessageType, transaction_id: [u8; 3], options: &'a [DhcpOption<'a>], ) -> MessageBuilder<'a>
Constructs a new MessageBuilder
.
Trait Implementations§
Source§impl<'a> Debug for MessageBuilder<'a>
impl<'a> Debug for MessageBuilder<'a>
Source§impl InnerPacketBuilder for MessageBuilder<'_>
impl InnerPacketBuilder for MessageBuilder<'_>
Source§fn bytes_len(&self) -> usize
fn bytes_len(&self) -> usize
Calculates the serialized length of the DHCPv6 message based on format defined in RFC 8415, Section 8.
Source§fn serialize(&self, buffer: &mut [u8])
fn serialize(&self, buffer: &mut [u8])
Serializes DHCPv6 message based on format defined in RFC 8415, Section 8.
§Panics
If buffer is too small. This means record_length
is not correctly implemented.
§fn into_serializer(self) -> InnerSerializer<Self, EmptyBuf>where
Self: Sized,
fn into_serializer(self) -> InnerSerializer<Self, EmptyBuf>where
Self: Sized,
§fn into_serializer_with<B>(self, buffer: B) -> InnerSerializer<Self, B>where
B: ShrinkBuffer,
Self: Sized,
fn into_serializer_with<B>(self, buffer: B) -> InnerSerializer<Self, B>where
B: ShrinkBuffer,
Self: Sized,
Converts this
InnerPacketBuilder
into a [Serializer
] with a buffer
that can be used for serialization. Read moreAuto Trait Implementations§
impl<'a> Freeze for MessageBuilder<'a>
impl<'a> RefUnwindSafe for MessageBuilder<'a>
impl<'a> Send for MessageBuilder<'a>
impl<'a> Sync for MessageBuilder<'a>
impl<'a> Unpin for MessageBuilder<'a>
impl<'a> UnwindSafe for MessageBuilder<'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