pub struct CollectedAnswer { /* private fields */ }Available on crate features
alloc or no-atomic or std only.Expand description
One collected answer record for a Query.
Stores the resource type, class, and raw rdata bytes so that deduplication, qtype/qclass filtering, and the answer cap can all be applied before inserting into the pool.
Implementations§
Source§impl CollectedAnswer
impl CollectedAnswer
Sourcepub fn rtype(&self) -> ResourceType
pub fn rtype(&self) -> ResourceType
The resource type of this answer.
Sourcepub fn rclass(&self) -> ResourceClass
pub fn rclass(&self) -> ResourceClass
The resource class of this answer.
Sourcepub fn rdata_slice(&self) -> &[u8] ⓘ
pub fn rdata_slice(&self) -> &[u8] ⓘ
The raw rdata bytes of this answer, with DNS name case PRESERVED (for
display). For identity/dedup comparisons use Self::rdata_key.
Sourcepub fn rdata_key(&self) -> &[u8] ⓘ
pub fn rdata_key(&self) -> &[u8] ⓘ
The case-FOLDED identity form of the rdata. Equal for two
answers that are the same logical record differing only in DNS name case;
callers coalescing/deduping answers should compare this, not
Self::rdata_slice (which preserves display case). resolves
to rdata when the folded form is identical (no separate buffer stored).
Trait Implementations§
Source§impl Clone for CollectedAnswer
impl Clone for CollectedAnswer
Source§fn clone(&self) -> CollectedAnswer
fn clone(&self) -> CollectedAnswer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !Freeze for CollectedAnswer
impl RefUnwindSafe for CollectedAnswer
impl Send for CollectedAnswer
impl Sync for CollectedAnswer
impl Unpin for CollectedAnswer
impl UnsafeUnpin for CollectedAnswer
impl UnwindSafe for CollectedAnswer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more