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]
impl<'a> Clone for GenericRecordData<'a>
fn clone(&self) -> GenericRecordData<'a>
[src]
fn clone(&self) -> GenericRecordData<'a>
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<'a> Debug for GenericRecordData<'a>
[src]
impl<'a> Debug for GenericRecordData<'a>
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<'a> RecordData for GenericRecordData<'a>
[src]
impl<'a> RecordData for GenericRecordData<'a>
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 GenericRecordData<'a>
[src]
impl<'a> ParsedRecordData<'a> for GenericRecordData<'a>
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<'a> Display for GenericRecordData<'a>
[src]
impl<'a> Display for GenericRecordData<'a>
Auto Trait Implementations
impl<'a> Send for GenericRecordData<'a>
impl<'a> Send for GenericRecordData<'a>
impl<'a> Sync for GenericRecordData<'a>
impl<'a> Sync for GenericRecordData<'a>