pub struct Lookup { /* private fields */ }
Expand description
Result of a DNS query when querying for any record type supported by the Hickory DNS Proto library.
For IP resolution see LookupIp, as it has more features for A and AAAA lookups.
Implementations§
Source§impl Lookup
impl Lookup
Sourcepub fn from_rdata(query: Query, rdata: RData) -> Self
pub fn from_rdata(query: Query, rdata: RData) -> Self
Return new instance with given rdata and the maximum TTL.
Sourcepub fn new_with_max_ttl(query: Query, records: Arc<[Record]>) -> Self
pub fn new_with_max_ttl(query: Query, records: Arc<[Record]>) -> Self
Return new instance with given records and the maximum TTL.
Sourcepub fn new_with_deadline(
query: Query,
records: Arc<[Record]>,
valid_until: Instant,
) -> Self
pub fn new_with_deadline( query: Query, records: Arc<[Record]>, valid_until: Instant, ) -> Self
Return a new instance with the given records and deadline.
Sourcepub fn query(&self) -> &Query
pub fn query(&self) -> &Query
Returns a reference to the Query
that was used to produce this result.
Sourcepub fn iter(&self) -> LookupIter<'_> ⓘ
pub fn iter(&self) -> LookupIter<'_> ⓘ
Returns an iterator over the data of all records returned during the query.
It may include additional record types beyond the queried type, e.g. CNAME.
Sourcepub fn dnssec_iter(&self) -> DnssecIter<'_> ⓘ
Available on crate feature dnssec
only.
pub fn dnssec_iter(&self) -> DnssecIter<'_> ⓘ
dnssec
only.Returns a borrowed iterator of the returned data wrapped in a dnssec Proven type
Sourcepub fn record_iter(&self) -> LookupRecordIter<'_> ⓘ
pub fn record_iter(&self) -> LookupRecordIter<'_> ⓘ
Returns an iterator over all records returned during the query.
It may include additional record types beyond the queried type, e.g. CNAME.
Sourcepub fn dnssec_record_iter(&self) -> DnssecLookupRecordIter<'_> ⓘ
Available on crate feature dnssec
only.
pub fn dnssec_record_iter(&self) -> DnssecLookupRecordIter<'_> ⓘ
dnssec
only.Returns a borrowed iterator of the returned records wrapped in a dnssec Proven type
Sourcepub fn valid_until(&self) -> Instant
pub fn valid_until(&self) -> Instant
Returns the Instant
at which this Lookup
is no longer valid.
Sourcepub fn records(&self) -> &[Record]
pub fn records(&self) -> &[Record]
Returns an slice over all records that were returned during the query, this can include additional record types beyond the queried type, e.g. CNAME.
Sourcepub fn extend_records(&mut self, other: Vec<Record>)
pub fn extend_records(&mut self, other: Vec<Record>)
Add new records to this lookup, without creating a new Lookup
Trait Implementations§
Source§impl From<CertLookup> for Lookup
impl From<CertLookup> for Lookup
Source§fn from(revlookup: CertLookup) -> Self
fn from(revlookup: CertLookup) -> Self
Source§impl From<Ipv4Lookup> for Lookup
impl From<Ipv4Lookup> for Lookup
Source§fn from(revlookup: Ipv4Lookup) -> Self
fn from(revlookup: Ipv4Lookup) -> Self
Source§impl From<Ipv6Lookup> for Lookup
impl From<Ipv6Lookup> for Lookup
Source§fn from(revlookup: Ipv6Lookup) -> Self
fn from(revlookup: Ipv6Lookup) -> Self
Source§impl From<Lookup> for CertLookup
impl From<Lookup> for CertLookup
Source§impl From<Lookup> for Ipv4Lookup
impl From<Lookup> for Ipv4Lookup
Source§impl From<Lookup> for Ipv6Lookup
impl From<Lookup> for Ipv6Lookup
Source§impl From<Lookup> for ReverseLookup
impl From<Lookup> for ReverseLookup
Source§impl From<Lookup> for TlsaLookup
impl From<Lookup> for TlsaLookup
Source§impl From<ReverseLookup> for Lookup
impl From<ReverseLookup> for Lookup
Source§fn from(revlookup: ReverseLookup) -> Self
fn from(revlookup: ReverseLookup) -> Self
Source§impl From<TlsaLookup> for Lookup
impl From<TlsaLookup> for Lookup
Source§fn from(revlookup: TlsaLookup) -> Self
fn from(revlookup: TlsaLookup) -> Self
Source§impl IntoIterator for Lookup
impl IntoIterator for Lookup
impl Eq for Lookup
impl StructuralPartialEq for Lookup
Auto Trait Implementations§
impl Freeze for Lookup
impl RefUnwindSafe for Lookup
impl Send for Lookup
impl Sync for Lookup
impl Unpin for Lookup
impl UnwindSafe for Lookup
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.