Enum trust_dns_server::authority::AuthLookup
source · [−]pub enum AuthLookup {
Empty,
Records {
answers: LookupRecords,
additionals: Option<LookupRecords>,
},
SOA(LookupRecords),
AXFR {
start_soa: LookupRecords,
records: LookupRecords,
end_soa: LookupRecords,
},
}
Expand description
The result of a lookup on an Authority
Lifetimes
'c
- the catalogue lifetime'r
- the recordset lifetime, subset of ’c'q
- the queries lifetime
Variants
Empty
No records
Records
Fields
answers: LookupRecords
Authoritative answers
additionals: Option<LookupRecords>
Optional set of LookupRecords
Records
SOA(LookupRecords)
Soa only differs from Records in that the lifetime on the name is from the authority, and not the query
AXFR
Fields
start_soa: LookupRecords
The first SOA record in an AXFR response
records: LookupRecords
The records to return
end_soa: LookupRecords
The last SOA record of an AXFR (matches the first)
An axfr starts with soa, chained to all the records, then another soa…
Implementations
sourceimpl AuthLookup
impl AuthLookup
sourcepub fn answers(
answers: LookupRecords,
additionals: Option<LookupRecords>
) -> Self
pub fn answers(
answers: LookupRecords,
additionals: Option<LookupRecords>
) -> Self
Construct an answer with additional section
sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true if either the associated Records are empty, or this is a NameExists or NxDomain
sourcepub fn was_empty(&self) -> bool
pub fn was_empty(&self) -> bool
This is an NxDomain or NameExists, and has no associated records
this consumes the iterator, and verifies it is empty
sourcepub fn iter(&self) -> AuthLookupIter<'_>ⓘNotable traits for AuthLookupIter<'r>impl<'r> Iterator for AuthLookupIter<'r> type Item = &'r Record;
pub fn iter(&self) -> AuthLookupIter<'_>ⓘNotable traits for AuthLookupIter<'r>impl<'r> Iterator for AuthLookupIter<'r> type Item = &'r Record;
Conversion to an iterator
sourcepub fn unwrap_records(self) -> LookupRecords
pub fn unwrap_records(self) -> LookupRecords
Does not panic, but will return no records if it is not of that type
sourcepub fn take_additionals(&mut self) -> Option<LookupRecords>
pub fn take_additionals(&mut self) -> Option<LookupRecords>
Takes the additional records, leaving behind None
Trait Implementations
sourceimpl Debug for AuthLookup
impl Debug for AuthLookup
sourceimpl Default for AuthLookup
impl Default for AuthLookup
sourceimpl From<LookupRecords> for AuthLookup
impl From<LookupRecords> for AuthLookup
sourcefn from(lookup: LookupRecords) -> Self
fn from(lookup: LookupRecords) -> Self
Performs the conversion.
sourceimpl<'a> IntoIterator for &'a AuthLookup
impl<'a> IntoIterator for &'a AuthLookup
sourceimpl LookupObject for AuthLookup
impl LookupObject for AuthLookup
sourcefn is_empty(&self) -> bool
fn is_empty(&self) -> bool
Returns true if either the associated Records are empty, or this is a NameExists or NxDomain
sourcefn iter<'a>(&'a self) -> Box<dyn Iterator<Item = &'a Record> + Send + 'a>
fn iter<'a>(&'a self) -> Box<dyn Iterator<Item = &'a Record> + Send + 'a>
Conversion to an iterator
sourcefn take_additionals(&mut self) -> Option<Box<dyn LookupObject>>
fn take_additionals(&mut self) -> Option<Box<dyn LookupObject>>
For CNAME and similar records, this is an additional set of lookup records Read more
Auto Trait Implementations
impl RefUnwindSafe for AuthLookup
impl Send for AuthLookup
impl Sync for AuthLookup
impl Unpin for AuthLookup
impl UnwindSafe for AuthLookup
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub 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>,
pub 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