Struct domain::bits::name::DNameBuilder [−][src]
pub struct DNameBuilder<'a>(_);
Builds an owned domain step by step from bytes.
This type allows to build a DNameBuf
slowly by feeding bytes. It is
used by the master format scanner.
Methods
impl<'a> DNameBuilder<'a>
[src]
impl<'a> DNameBuilder<'a>
pub fn new(origin: Option<&'a DNameSlice>) -> Self
[src]
pub fn new(origin: Option<&'a DNameSlice>) -> Self
Create a new domain name builder.
If origin
is given, it will be appened to the resulting domain
name if it is relative.
pub fn push(&mut self, b: u8) -> Result<(), FromStrError>
[src]
pub fn push(&mut self, b: u8) -> Result<(), FromStrError>
Pushes an octet to the end of the builder.
pub fn end_label(&mut self)
[src]
pub fn end_label(&mut self)
Pushes a label end to the builder.
pub fn done(self) -> Result<DNameBuf, FromStrError>
[src]
pub fn done(self) -> Result<DNameBuf, FromStrError>
Extracts the finished domain name from the builder.
Trait Implementations
impl<'a> Clone for DNameBuilder<'a>
[src]
impl<'a> Clone for DNameBuilder<'a>
fn clone(&self) -> DNameBuilder<'a>
[src]
fn clone(&self) -> DNameBuilder<'a>
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)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl<'a> Debug for DNameBuilder<'a>
[src]
impl<'a> Debug for DNameBuilder<'a>
Auto Trait Implementations
impl<'a> Send for DNameBuilder<'a>
impl<'a> Send for DNameBuilder<'a>
impl<'a> Sync for DNameBuilder<'a>
impl<'a> Sync for DNameBuilder<'a>