[][src]Struct domain_core::rdata::rfc1035::Txt

pub struct Txt { /* fields omitted */ }

Txt record data.

Txt records hold descriptive text.

The Txt record type is defined in RFC 1035, section 3.3.14.

Methods

impl Txt[src]

pub fn new(text: CharStr) -> Self[src]

Creates a new Txt record from a single character string.

Important traits for TxtIter
pub fn iter(&self) -> TxtIter[src]

Returns an iterator over the text items.

The Txt format contains one or more length-delimited byte strings. This method returns an iterator over each of them.

pub fn text(&self) -> Bytes[src]

Returns the text content.

If the data is only one single character string, returns a simple clone of the slice with the data. If there are several character strings, their content will be copied together into one single, newly allocated bytes value.

Access to the individual character strings is possible via iteration.

Trait Implementations

impl Compose for Txt[src]

impl Compress for Txt[src]

impl ParseAll for Txt[src]

type Err = ParseOpenError

The type returned when parsing fails.

impl RtypeRecordData for Txt[src]

impl Scan for Txt[src]

impl<N> From<Txt> for MasterRecordData<N>[src]

impl<N> From<Txt> for AllRecordData<N>[src]

impl PartialEq<Txt> for Txt[src]

impl PartialOrd<Txt> for Txt[src]

impl Eq for Txt[src]

impl Ord for Txt[src]

fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl Clone for Txt[src]

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

Performs copy-assignment from source. Read more

impl IntoIterator for Txt[src]

type Item = CharStr

The type of the elements being iterated over.

type IntoIter = TxtIter

Which kind of iterator are we turning this into?

impl<'a> IntoIterator for &'a Txt[src]

type Item = CharStr

The type of the elements being iterated over.

type IntoIter = TxtIter

Which kind of iterator are we turning this into?

impl Debug for Txt[src]

impl Display for Txt[src]

impl Hash for Txt[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl Send for Txt

impl Sync for Txt

Blanket Implementations

impl<T> RecordData for T where
    T: Compose + Compress + RtypeRecordData
[src]

impl<T> ParseRecordData for T where
    T: Compose + Compress + ParseAll + RtypeRecordData
[src]

type Err = <T as ParseAll>::Err

The type of an error returned when parsing fails.

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.