[][src]Struct domain_core::bits::message_builder::AuthorityBuilder

pub struct AuthorityBuilder { /* fields omitted */ }

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]

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 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]

impl Clone for 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

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]