[−][src]Struct domain_core::bits::message_builder::AuthorityBuilder
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.
Methods
impl AuthorityBuilder
[src]
pub fn additional(self) -> AdditionalBuilder
[src]
Proceeds to building the additional section.
pub fn opt(self) -> Result<OptBuilder, ShortBuf> where
Self: Sized,
[src]
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
impl SectionBuilder for AuthorityBuilder
[src]
fn into_target(self) -> MessageTarget
[src]
fn get_target(&self) -> &MessageTarget
[src]
fn get_target_mut(&mut self) -> &mut MessageTarget
[src]
fn set_limit(&mut self, limit: usize)
[src]
Updates the message’s size limit. Read more
fn header(&self) -> &Header
[src]
Returns a reference to the messages header.
fn header_mut(&mut self) -> &mut Header
[src]
Returns a mutable reference to the messages header.
fn preview(&self) -> &[u8]
[src]
Returns a reference to the message assembled so far. Read more
fn prelude(&self) -> &[u8]
[src]
Returns a reference to the slice preceeding the message. Read more
fn prelude_mut(&mut self) -> &mut [u8]
[src]
Returns a mutable reference to the slice preceeding the message.
fn finish(self) -> BytesMut
[src]
Finishes the message and returns the underlying bytes buffer. Read more
fn freeze(self) -> Message
[src]
Finishes the message and returns the resulting bytes value. Read more
fn snapshot(&self) -> Snapshot<Self>
[src]
Returns a snapshot indicating the current state of the message. Read more
fn rewind(&mut self, snapshot: &Snapshot<Self>)
[src]
Rewinds the message to the state it had at snapshot
. Read more
impl RecordSectionBuilder for AuthorityBuilder
[src]
fn push<N, D, R>(&mut self, record: R) -> Result<(), ShortBuf> where
N: ToDname,
D: RecordData,
R: Into<Record<N, D>>,
[src]
N: ToDname,
D: RecordData,
R: Into<Record<N, D>>,
impl Clone for AuthorityBuilder
[src]
fn clone(&self) -> AuthorityBuilder
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for AuthorityBuilder
[src]
Auto Trait Implementations
impl Send for AuthorityBuilder
impl Sync for AuthorityBuilder
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,