Struct dns_parser::Name [] [src]

pub struct Name<'a> {
    labels: &'a [u8],
    original: &'a [u8],
}

The DNS name as stored in the original packet

This is contains just a reference to a slice that contains the data. You may turn this into a string using .to_string()

Fields

labels
original

This is the original buffer size. The compressed names in original are calculated in this buffer

Methods

impl<'a> Name<'a>

fn scan(data: &'a [u8], original: &'a [u8]) -> Result<Name<'a>, Error>

fn byte_len(&self) -> usize

Trait Implementations

impl<'a> Display for Name<'a>

fn fmt(&self, fmt: &mut Formatter) -> Result

Derived Implementations

impl<'a> Copy for Name<'a>

impl<'a> Clone for Name<'a>

fn clone(&self) -> Name<'a>

1.0.0fn clone_from(&mut self, source: &Self)

impl<'a> Debug for Name<'a>

fn fmt(&self, __arg_0: &mut Formatter) -> Result