Struct domain::bits::rdata::GenericRecordData
[−]
[src]
pub struct GenericRecordData<'a> { /* fields omitted */ }
A type for parsing any type of record data.
This type accepts any record type and stores a reference to the plain
binary record data in the message. This way, it can later be converted
into concrete record data if necessary via the [reparse()
] method.
Because the data referenced by a value may contain compressed domain
names, transitively building a new message from this data may lead to
corrupt messages. To avoid this sort of thing,
RFC 3597, ‘Handling of Unknown DNS Resource Record (RR) Types,’
restricted compressed domain names to record types defined in RFC 1035.
Accordingly, this types RecordData::compose()
implementation treats
these types specially and ensures that their names are handles correctly.
This may still lead to corrupt messages, however, if the generic record
data is obtained from a source not complying with RFC 3597. In general,
be wary when re-composing parsed messages unseen.
Trait Implementations
impl<'a> Clone for GenericRecordData<'a>
[src]
fn clone(&self) -> GenericRecordData<'a>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'a> Debug for GenericRecordData<'a>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<'a> RecordData for GenericRecordData<'a>
[src]
fn rtype(&self) -> Rtype
[src]
Returns the record type for this record data instance. Read more
fn compose<C: AsMut<Composer>>(&self, target: C) -> ComposeResult<()>
[src]
Appends the record data to the end of a composer.
impl<'a> ParsedRecordData<'a> for GenericRecordData<'a>
[src]
fn parse(rtype: Rtype, parser: &mut Parser<'a>) -> ParseResult<Option<Self>>
[src]
Parses the record data out of a parser. Read more