Struct hickory_resolver::lookup::Lookup
source · 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 a borrowed iterator of the returned IPs
sourcepub fn record_iter(&self) -> LookupRecordIter<'_> ⓘ
pub fn record_iter(&self) -> LookupRecordIter<'_> ⓘ
Returns a borrowed iterator of the returned IPs
sourcepub fn valid_until(&self) -> Instant
pub fn valid_until(&self) -> Instant
Returns the Instant
at which this Lookup
is no longer valid.
Trait Implementations§
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 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
source§fn into_iter(self) -> Self::IntoIter
fn into_iter(self) -> Self::IntoIter
This is most likely not a free conversion, the RData
s will be cloned if data is
held behind an Arc with more than one reference (which is most likely the case coming from cache)
§type IntoIter = LookupIntoIter
type IntoIter = LookupIntoIter
source§impl PartialEq for Lookup
impl PartialEq 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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)