Struct dns_parser::Name [−][src]
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()
Implementations
impl<'a> Name<'a>
[src]
pub fn scan(data: &'a [u8], original: &'a [u8]) -> Result<Name<'a>, Error>
[src]
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]
Number of bytes serialized name occupies
Trait Implementations
impl<'a> Clone for Name<'a>
[src]
impl<'a> Copy for Name<'a>
[src]
impl<'a> Debug for Name<'a>
[src]
impl<'a> Display for Name<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for Name<'a>
impl<'a> Send for Name<'a>
impl<'a> Sync for Name<'a>
impl<'a> Unpin for Name<'a>
impl<'a> UnwindSafe for Name<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,