Struct dominion::body::ResourceRecord
source · pub struct ResourceRecord<'a> {
pub preamble: RecordPreamble<'a>,
pub data: RecordData<'a>,
}
Expand description
A description of a resource that can be used as an answer to a question
or to provide additional information in the authority
or additional
fields
of a DNS packet.
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
| |
/ /
/ NAME /
| |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
| TYPE |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
| CLASS |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
| TTL |
| |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
| RDLENGTH |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--|
/ RDATA /
/ /
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
Fields§
§preamble: RecordPreamble<'a>
Contains general information that every ResourceRecord shares, like type or class.
data: RecordData<'a>
The RDATA section of a resource record in some DNS packet.
Implementations§
source§impl<'a> ResourceRecord<'a>
impl<'a> ResourceRecord<'a>
sourcepub fn parse(
buff: &'a [u8],
pos: usize
) -> Result<(ResourceRecord<'a>, usize), ParseError>
pub fn parse(
buff: &'a [u8],
pos: usize
) -> Result<(ResourceRecord<'a>, usize), ParseError>
Parse from the specified buff
, starting at position pos
.
Trait Implementations§
source§impl<'a> Clone for ResourceRecord<'a>
impl<'a> Clone for ResourceRecord<'a>
source§fn clone(&self) -> ResourceRecord<'a>
fn clone(&self) -> ResourceRecord<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more