Struct domain::bits::message_builder::AuthorityBuilder [−][src]
pub struct AuthorityBuilder { /* fields omitted */ }
A type for building 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.
Methods
impl AuthorityBuilder
[src]
impl AuthorityBuilder
pub fn header(&self) -> &Header
[src]
pub fn header(&self) -> &Header
Returns a reference to the messages header.
pub fn header_mut(&mut self) -> &mut Header
[src]
pub fn header_mut(&mut self) -> &mut Header
Returns a mutable reference to the messages header.
pub fn push<N, D, R>(&mut self, record: R) -> ComposeResult<()> where
N: DName,
D: RecordData,
R: Into<Record<N, D>>,
[src]
pub fn push<N, D, R>(&mut self, record: R) -> ComposeResult<()> where
N: DName,
D: RecordData,
R: Into<Record<N, D>>,
Appends a new resource record to the authority section.
This method is generic over anything that can be converted into a
Record
. In particular, you can use four-tuples consisting of
a domain name, class, TTL, and record data or triples leaving out
the class which will then be assumed to be Class::In
.
pub fn rewind(&mut self)
[src]
pub fn rewind(&mut self)
Rewinds to the beginning of the authority section.
This drops all previously assembled authority records.
pub fn additional(self) -> AdditionalBuilder
[src]
pub fn additional(self) -> AdditionalBuilder
Proceeds to building the additional section.
pub fn preview(&mut self) -> &[u8]
[src]
pub fn preview(&mut self) -> &[u8]
Returns a reference to the message assembled so far.
This method requires a &mut self
since it may need to update some
length values to return a valid message.
In case the builder was created from a vector with previous content, the returned reference is for the full content of this vector.
pub fn finish(self) -> Vec<u8>
[src]
pub fn finish(self) -> Vec<u8>
Finishes the message.
The resulting message will have an empty additional section.
Trait Implementations
impl Clone for AuthorityBuilder
[src]
impl Clone for AuthorityBuilder
fn clone(&self) -> AuthorityBuilder
[src]
fn clone(&self) -> AuthorityBuilder
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for AuthorityBuilder
[src]
impl Debug for AuthorityBuilder
Auto Trait Implementations
impl Send for AuthorityBuilder
impl Send for AuthorityBuilder
impl Sync for AuthorityBuilder
impl Sync for AuthorityBuilder