Struct dns_parser::Name [−][src]
pub struct Name<'a> { /* fields omitted */ }
The DNS name as stored in the original packet
This contains just a reference to a slice that contains the data.
You may turn this into a string using .to_string()
Methods
impl<'a> Name<'a>
[src]
impl<'a> Name<'a>
pub fn scan(data: &'a [u8], original: &'a [u8]) -> Result<Name<'a>, Error>
[src]
pub fn scan(data: &'a [u8], original: &'a [u8]) -> Result<Name<'a>, Error>
Scan the data to get Name object
The data
should be a part of original
where name should start.
The original
is the data starting a the start of a packet, so
that offsets in compressed name starts from the original
.
pub fn byte_len(&self) -> usize
[src]
pub fn byte_len(&self) -> usize
Number of bytes serialized name occupies
Trait Implementations
impl<'a> Clone for Name<'a>
[src]
impl<'a> Clone for Name<'a>
fn clone(&self) -> Name<'a>
[src]
fn clone(&self) -> Name<'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> Copy for Name<'a>
[src]
impl<'a> Copy for Name<'a>
impl<'a> Display for Name<'a>
[src]
impl<'a> Display for Name<'a>
fn fmt(&self, fmt: &mut Formatter) -> Result
[src]
fn fmt(&self, fmt: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<'a> Debug for Name<'a>
[src]
impl<'a> Debug for Name<'a>