pub struct AuthorityBuilder { /* private fields */ }
Expand description
Builds the authority section of a DNS message.
This type can be constructed by calling authority()
on a
MessageBuilder
or AnswerBuilder
. See the module documentation
for details on constructing messages.
Once acquired, you can use this type to add records to the authority
section of a message via the push
method.
Implementations§
Source§impl AuthorityBuilder
impl AuthorityBuilder
Sourcepub fn additional(self) -> AdditionalBuilder
pub fn additional(self) -> AdditionalBuilder
Proceeds to building the additional section.
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 AuthorityBuilder
impl Clone for AuthorityBuilder
Source§fn clone(&self) -> AuthorityBuilder
fn clone(&self) -> AuthorityBuilder
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 AuthorityBuilder
impl Debug for AuthorityBuilder
Source§impl SectionBuilder for AuthorityBuilder
impl SectionBuilder for AuthorityBuilder
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 AuthorityBuilder
impl RefUnwindSafe for AuthorityBuilder
impl Send for AuthorityBuilder
impl Sync for AuthorityBuilder
impl Unpin for AuthorityBuilder
impl UnwindSafe for AuthorityBuilder
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