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,
answers: impl IntoIterator<Item = Record>,
) -> Self
pub fn new_with_max_ttl( query: Query, answers: impl IntoIterator<Item = Record>, ) -> Self
Return new instance with given records and the maximum TTL.
Sourcepub fn new_with_deadline(
query: Query,
answers: impl IntoIterator<Item = Record>,
valid_until: Instant,
) -> Self
pub fn new_with_deadline( query: Query, answers: impl IntoIterator<Item = 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.
Returns a reference to the authority records from the message.
Sourcepub fn additionals(&self) -> &[Record]
pub fn additionals(&self) -> &[Record]
Returns a reference to the additional records from the message.
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§
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 UnsafeUnpin 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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
Converts
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>
Converts
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