Struct Lookup
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§
§impl Lookup
impl Lookup
pub fn from_rdata(query: Query, rdata: RData) -> Lookup
pub fn from_rdata(query: Query, rdata: RData) -> Lookup
Return new instance with given rdata and the maximum TTL.
pub fn new_with_max_ttl(query: Query, records: Arc<[Record]>) -> Lookup
pub fn new_with_max_ttl(query: Query, records: Arc<[Record]>) -> Lookup
Return new instance with given records and the maximum TTL.
pub fn new_with_deadline(
query: Query,
records: Arc<[Record]>,
valid_until: Instant,
) -> Lookup
pub fn new_with_deadline( query: Query, records: Arc<[Record]>, valid_until: Instant, ) -> Lookup
Return a new instance with the given records and deadline.
pub 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.
pub 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.
pub fn valid_until(&self) -> Instant
pub fn valid_until(&self) -> Instant
Returns the Instant
at which this Lookup
is no longer valid.
pub 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.
pub 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§
§impl From<CertLookup> for Lookup
impl From<CertLookup> for Lookup
§fn from(revlookup: CertLookup) -> Lookup
fn from(revlookup: CertLookup) -> Lookup
§impl From<Ipv4Lookup> for Lookup
impl From<Ipv4Lookup> for Lookup
§fn from(revlookup: Ipv4Lookup) -> Lookup
fn from(revlookup: Ipv4Lookup) -> Lookup
§impl From<Ipv6Lookup> for Lookup
impl From<Ipv6Lookup> for Lookup
§fn from(revlookup: Ipv6Lookup) -> Lookup
fn from(revlookup: Ipv6Lookup) -> Lookup
§impl From<Lookup> for CertLookup
impl From<Lookup> for CertLookup
§fn from(lookup: Lookup) -> CertLookup
fn from(lookup: Lookup) -> CertLookup
§impl From<Lookup> for Ipv4Lookup
impl From<Lookup> for Ipv4Lookup
§fn from(lookup: Lookup) -> Ipv4Lookup
fn from(lookup: Lookup) -> Ipv4Lookup
§impl From<Lookup> for Ipv6Lookup
impl From<Lookup> for Ipv6Lookup
§fn from(lookup: Lookup) -> Ipv6Lookup
fn from(lookup: Lookup) -> Ipv6Lookup
§impl From<Lookup> for ReverseLookup
impl From<Lookup> for ReverseLookup
§fn from(lookup: Lookup) -> ReverseLookup
fn from(lookup: Lookup) -> ReverseLookup
§impl From<Lookup> for TlsaLookup
impl From<Lookup> for TlsaLookup
§fn from(lookup: Lookup) -> TlsaLookup
fn from(lookup: Lookup) -> TlsaLookup
§impl From<ReverseLookup> for Lookup
impl From<ReverseLookup> for Lookup
§fn from(revlookup: ReverseLookup) -> Lookup
fn from(revlookup: ReverseLookup) -> Lookup
§impl From<TlsaLookup> for Lookup
impl From<TlsaLookup> for Lookup
§fn from(revlookup: TlsaLookup) -> Lookup
fn from(revlookup: TlsaLookup) -> Lookup
§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§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy
that returns Action::Follow
only if self
and other
return
Action::Follow
. Read more