Struct domain::rdata::rfc1035::Txt [−][src]
Txt record data.
Txt records hold descriptive text.
The Txt record type is defined in RFC 1035, section 3.3.14.
Methods
impl<T: AsRef<[u8]>> Txt<T>
[src]
impl<T: AsRef<[u8]>> Txt<T>
pub fn new(text: T) -> Self
[src]
pub fn new(text: T) -> Self
Creates a new Txt record from content.
ⓘImportant traits for TxtIter<'a>pub fn iter(&self) -> TxtIter
[src]
pub fn iter(&self) -> TxtIter
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) -> Cow<[u8]>
[src]
pub fn text(&self) -> Cow<[u8]>
Returns the text content.
If the raw content is only a single character-string, returns a borrow else creates an owned vec by concatenating all the parts.
impl Txt<Vec<u8>>
[src]
impl Txt<Vec<u8>>
pub fn scan<S: Scanner>(
scanner: &mut S,
_origin: Option<&DNameSlice>
) -> ScanResult<Self>
[src]
pub fn scan<S: Scanner>(
scanner: &mut S,
_origin: Option<&DNameSlice>
) -> ScanResult<Self>
Trait Implementations
impl<T: Clone + AsRef<[u8]>> Clone for Txt<T>
[src]
impl<T: Clone + AsRef<[u8]>> Clone for Txt<T>
fn clone(&self) -> Txt<T>
[src]
fn clone(&self) -> Txt<T>
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)
Performs copy-assignment from source
. Read more
impl<T: Debug + AsRef<[u8]>> Debug for Txt<T>
[src]
impl<T: Debug + AsRef<[u8]>> Debug for Txt<T>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<T: Eq + AsRef<[u8]>> Eq for Txt<T>
[src]
impl<T: Eq + AsRef<[u8]>> Eq for Txt<T>
impl<T: Ord + AsRef<[u8]>> Ord for Txt<T>
[src]
impl<T: Ord + AsRef<[u8]>> Ord for Txt<T>
fn cmp(&self, other: &Txt<T>) -> Ordering
[src]
fn cmp(&self, other: &Txt<T>) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl<T: PartialEq + AsRef<[u8]>> PartialEq for Txt<T>
[src]
impl<T: PartialEq + AsRef<[u8]>> PartialEq for Txt<T>
fn eq(&self, other: &Txt<T>) -> bool
[src]
fn eq(&self, other: &Txt<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Txt<T>) -> bool
[src]
fn ne(&self, other: &Txt<T>) -> bool
This method tests for !=
.
impl<T: PartialOrd + AsRef<[u8]>> PartialOrd for Txt<T>
[src]
impl<T: PartialOrd + AsRef<[u8]>> PartialOrd for Txt<T>
fn partial_cmp(&self, other: &Txt<T>) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Txt<T>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Txt<T>) -> bool
[src]
fn lt(&self, other: &Txt<T>) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Txt<T>) -> bool
[src]
fn le(&self, other: &Txt<T>) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Txt<T>) -> bool
[src]
fn gt(&self, other: &Txt<T>) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Txt<T>) -> bool
[src]
fn ge(&self, other: &Txt<T>) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<T: AsRef<[u8]>> RecordData for Txt<T>
[src]
impl<T: AsRef<[u8]>> RecordData for Txt<T>
fn rtype(&self) -> Rtype
[src]
fn rtype(&self) -> Rtype
Returns the record type for this record data instance. Read more
fn compose<C: AsMut<Composer>>(&self, target: C) -> ComposeResult<()>
[src]
fn compose<C: AsMut<Composer>>(&self, target: C) -> ComposeResult<()>
Appends the record data to the end of a composer.
impl<'a> ParsedRecordData<'a> for Txt<&'a [u8]>
[src]
impl<'a> ParsedRecordData<'a> for Txt<&'a [u8]>
fn parse(rtype: Rtype, parser: &mut Parser<'a>) -> ParseResult<Option<Self>>
[src]
fn parse(rtype: Rtype, parser: &mut Parser<'a>) -> ParseResult<Option<Self>>
Parses the record data out of a parser. Read more
impl<T: AsRef<[u8]>> Display for Txt<T>
[src]
impl<T: AsRef<[u8]>> Display for Txt<T>