pub struct MessageBuilder<'a> {
pub id: u16,
pub flags: u16,
/* private fields */
}
Expand description
A builder for creating an mDNS message.
Fields§
§id: u16
§flags: u16
Implementations§
Source§impl<'a> MessageBuilder<'a>
impl<'a> MessageBuilder<'a>
pub fn new(id: u16, is_query: bool) -> Self
pub fn add_question(&mut self, q: QuestionBuilder)
pub fn add_answer(&mut self, a: RecordBuilder<'a>)
pub fn add_additional(&mut self, a: RecordBuilder<'a>)
Trait Implementations§
Source§impl InnerPacketBuilder for MessageBuilder<'_>
impl InnerPacketBuilder for MessageBuilder<'_>
Source§fn serialize(&self, buffer: &mut [u8])
fn serialize(&self, buffer: &mut [u8])
Serializes this packet into an existing buffer. Read more
§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