pub struct AnswerBuilder { /* private fields */ }
Expand description
Builds the answer section of a DNS message.
This type is typically constructed by calling answer
on a
MessageBuilder
. See the module documentation for an overview of how
to build a message.
Once acquired, you can access a message’s header or append resource
records to the message’s answer section with the push
method.
Implementations§
Source§impl AnswerBuilder
impl AnswerBuilder
Proceeds to building the authority section.
Sourcepub fn additional(self) -> AdditionalBuilder
pub fn additional(self) -> AdditionalBuilder
Proceeds to building the additional section, skipping authority.
Sourcepub fn opt(self) -> Result<OptBuilder, ShortBuf>where
Self: Sized,
pub fn opt(self) -> Result<OptBuilder, ShortBuf>where
Self: Sized,
Proceeds to building the OPT record.
The method will start by adding the record header. Since this may
exceed the message limit, the method may fail.
If you have saved space for the OPT record via set_limit
earlier,
remember to increase the limit again before calling opt
.
Trait Implementations§
Source§impl Clone for AnswerBuilder
impl Clone for AnswerBuilder
Source§fn clone(&self) -> AnswerBuilder
fn clone(&self) -> AnswerBuilder
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 moreSource§impl Debug for AnswerBuilder
impl Debug for AnswerBuilder
Source§impl RecordSectionBuilder for AnswerBuilder
impl RecordSectionBuilder for AnswerBuilder
Source§impl SectionBuilder for AnswerBuilder
impl SectionBuilder for AnswerBuilder
Source§fn into_target(self) -> MessageTarget
fn into_target(self) -> MessageTarget
Converts into target
Source§fn get_target(&self) -> &MessageTarget
fn get_target(&self) -> &MessageTarget
Returns message target
Source§fn get_target_mut(&mut self) -> &mut MessageTarget
fn get_target_mut(&mut self) -> &mut MessageTarget
Returns message target
Source§fn header_mut(&mut self) -> &mut Header
fn header_mut(&mut self) -> &mut Header
Returns a mutable reference to the messages header.
Source§fn prelude(&self) -> &[u8] ⓘ
fn prelude(&self) -> &[u8] ⓘ
Returns a reference to the slice preceeding the message. Read more
Source§fn prelude_mut(&mut self) -> &mut [u8] ⓘ
fn prelude_mut(&mut self) -> &mut [u8] ⓘ
Returns a mutable reference to the slice preceeding the message.
Source§fn finish(self) -> BytesMut
fn finish(self) -> BytesMut
Finishes the message and returns the underlying bytes buffer. Read more
Source§fn freeze(self) -> Message
fn freeze(self) -> Message
Finishes the message and returns the resulting bytes value. Read more
Auto Trait Implementations§
impl !Freeze for AnswerBuilder
impl RefUnwindSafe for AnswerBuilder
impl Send for AnswerBuilder
impl Sync for AnswerBuilder
impl Unpin for AnswerBuilder
impl UnwindSafe for AnswerBuilder
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