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
Records
Fields
answers: LookupRecordsAuthoritative answers
additionals: Option<LookupRecords>Optional set of LookupRecords
SOA(LookupRecords)
Soa only differs from Records in that the lifetime on the name is from the authority, and not the query
AXFR
An axfr starts with soa, chained to all the records, then another soa…
Fields
start_soa: LookupRecordsThe first SOA record in an AXFR response
records: LookupRecordsThe records to return
end_soa: LookupRecordsThe last SOA record of an AXFR (matches the first)
Implementations§
Source§impl 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<'_> ⓘ
pub fn iter(&self) -> AuthLookupIter<'_> ⓘ
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