Struct domain::rdata::rfc1035::Txt
[−]
[src]
pub struct Txt<T: AsRef<[u8]>> { /* 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<T: AsRef<[u8]>> Txt<T>
[src]
fn new(text: T) -> Self
Creates a new Txt record from content.
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.
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]
fn scan<S: Scanner>(
scanner: &mut S,
_origin: Option<&DNameSlice>
) -> ScanResult<Self>
scanner: &mut S,
_origin: Option<&DNameSlice>
) -> ScanResult<Self>
Trait Implementations
impl<T: Clone + AsRef<[u8]>> Clone for 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
Performs copy-assignment from source
. Read more
impl<T: Debug + AsRef<[u8]>> Debug for Txt<T>
[src]
impl<T: Eq + AsRef<[u8]>> Eq for Txt<T>
[src]
impl<T: Ord + AsRef<[u8]>> Ord for Txt<T>
[src]
fn cmp(&self, __arg_0: &Txt<T>) -> Ordering
This method returns an Ordering
between self
and other
. Read more
impl<T: PartialEq + AsRef<[u8]>> PartialEq for Txt<T>
[src]
fn eq(&self, __arg_0: &Txt<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Txt<T>) -> bool
This method tests for !=
.
impl<T: PartialOrd + AsRef<[u8]>> PartialOrd for Txt<T>
[src]
fn partial_cmp(&self, __arg_0: &Txt<T>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Txt<T>) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &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, __arg_0: &Txt<T>) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &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]
fn rtype(&self) -> Rtype
Returns the record type for this record data instance. Read more
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]
fn parse(rtype: Rtype, parser: &mut Parser<'a>) -> ParseResult<Option<Self>>
Parses the record data out of a parser.