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

pub struct Txt<Octets>(_);

Txt record data.

Txt records hold descriptive text.

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

Implementations

impl<Octets: FromBuilder> Txt<Octets>[src]

pub fn from_slice(text: &[u8]) -> Result<Self, ShortBuf> where
    <Octets as FromBuilder>::Builder: EmptyBuilder
[src]

Creates a new Txt record from a single character string.

impl<Octets: AsRef<[u8]>> Txt<Octets>[src]

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 as_flat_slice(&self) -> Option<&[u8]>[src]

pub fn len(&self) -> usize[src]

pub fn is_empty(&self) -> bool[src]

pub fn text<T: FromBuilder>(&self) -> Result<T, ShortBuf> where
    <T as FromBuilder>::Builder: EmptyBuilder
[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<Octets, Other> CanonicalOrd<Txt<Other>> for Txt<Octets> where
    Octets: AsRef<[u8]>,
    Other: AsRef<[u8]>, 
[src]

impl<Octets: Clone> Clone for Txt<Octets>[src]

impl<Octets: AsRef<[u8]>> Compose for Txt<Octets>[src]

impl<Octets: AsRef<[u8]>> Debug for Txt<Octets>[src]

impl<Octets: AsRef<[u8]>> Display for Txt<Octets>[src]

impl<Octets: AsRef<[u8]>> Eq for Txt<Octets>[src]

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

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

impl<Octets: AsRef<[u8]>> Hash for Txt<Octets>[src]

impl<'a, Octets: AsRef<[u8]>> IntoIterator for &'a Txt<Octets>[src]

type Item = &'a [u8]

The type of the elements being iterated over.

type IntoIter = TxtIter<'a>

Which kind of iterator are we turning this into?

impl<Octets: AsRef<[u8]>> Ord for Txt<Octets>[src]

impl<Ref: OctetsRef> Parse<Ref> for Txt<Ref::Range>[src]

impl<Octets, Other> PartialEq<Txt<Other>> for Txt<Octets> where
    Octets: AsRef<[u8]>,
    Other: AsRef<[u8]>, 
[src]

impl<Octets, Other> PartialOrd<Txt<Other>> for Txt<Octets> where
    Octets: AsRef<[u8]>,
    Other: AsRef<[u8]>, 
[src]

impl<Octets> RtypeRecordData for Txt<Octets>[src]

Auto Trait Implementations

impl<Octets> RefUnwindSafe for Txt<Octets> where
    Octets: RefUnwindSafe

impl<Octets> Send for Txt<Octets> where
    Octets: Send

impl<Octets> Sync for Txt<Octets> where
    Octets: Sync

impl<Octets> Unpin for Txt<Octets> where
    Octets: Unpin

impl<Octets> UnwindSafe for Txt<Octets> where
    Octets: UnwindSafe

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

impl<Octets, T> ParseRecordData<Octets> for T where
    T: RtypeRecordData + Parse<Octets> + Compose
[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,