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
sourceimpl<'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
sourceimpl<'a> Clone for ResourceRecord<'a>
impl<'a> Clone for ResourceRecord<'a>
sourcefn clone(&self) -> ResourceRecord<'a>
fn clone(&self) -> ResourceRecord<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl<'a> RefUnwindSafe for ResourceRecord<'a>
impl<'a> Send for ResourceRecord<'a>
impl<'a> Sync for ResourceRecord<'a>
impl<'a> Unpin for ResourceRecord<'a>
impl<'a> UnwindSafe for ResourceRecord<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more