Struct async_std_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 Trust-DNS Proto library.
For IP resolution see LookupIp, as it has more features for A and AAAA lookups.
Implementations
sourceimpl Lookup
impl Lookup
sourcepub 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.
sourcepub 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.
sourcepub 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.
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<'_>ⓘNotable traits for LookupIter<'a>impl<'a> Iterator for LookupIter<'a> type Item = &'a RData;
pub fn iter(&self) -> LookupIter<'_>ⓘNotable traits for LookupIter<'a>impl<'a> Iterator for LookupIter<'a> type Item = &'a RData;
Returns a borrowed iterator of the returned IPs
sourcepub fn record_iter(&self) -> LookupRecordIter<'_>ⓘNotable traits for LookupRecordIter<'a>impl<'a> Iterator for LookupRecordIter<'a> type Item = &'a Record;
pub fn record_iter(&self) -> LookupRecordIter<'_>ⓘNotable traits for LookupRecordIter<'a>impl<'a> Iterator for LookupRecordIter<'a> type Item = &'a Record;
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
sourceimpl From<Lookup> for Ipv4Lookup
impl From<Lookup> for Ipv4Lookup
sourcefn from(lookup: Lookup) -> Ipv4Lookup
fn from(lookup: Lookup) -> Ipv4Lookup
Converts to this type from the input type.
sourceimpl From<Lookup> for Ipv6Lookup
impl From<Lookup> for Ipv6Lookup
sourcefn from(lookup: Lookup) -> Ipv6Lookup
fn from(lookup: Lookup) -> Ipv6Lookup
Converts to this type from the input type.
sourceimpl From<Lookup> for ReverseLookup
impl From<Lookup> for ReverseLookup
sourcefn from(lookup: Lookup) -> ReverseLookup
fn from(lookup: Lookup) -> ReverseLookup
Converts to this type from the input type.
sourceimpl From<Lookup> for TlsaLookup
impl From<Lookup> for TlsaLookup
sourcefn from(lookup: Lookup) -> TlsaLookup
fn from(lookup: Lookup) -> TlsaLookup
Converts to this type from the input type.
sourceimpl IntoIterator for Lookup
impl IntoIterator for Lookup
sourcefn into_iter(self) -> <Lookup as IntoIterator>::IntoIter
fn into_iter(self) -> <Lookup as IntoIterator>::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 Item = RData
type Item = RData
The type of the elements being iterated over.
type IntoIter = LookupIntoIter
type IntoIter = LookupIntoIter
Which kind of iterator are we turning this into?
sourceimpl PartialEq<Lookup> for Lookup
impl PartialEq<Lookup> for Lookup
impl Eq for Lookup
impl StructuralEq for Lookup
impl StructuralPartialEq for Lookup
Auto Trait Implementations
impl RefUnwindSafe for Lookup
impl Send for Lookup
impl Sync for Lookup
impl Unpin for Lookup
impl UnwindSafe for Lookup
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more