#[non_exhaustive]pub enum AuthLookup {
Empty,
Records {
answers: LookupRecords,
additionals: Option<LookupRecords>,
},
Resolved(Lookup),
Response(Message),
}Expand description
The result of a lookup on a ZoneHandler
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Empty
No records
Records
Records
Fields
§
answers: LookupRecordsAuthoritative answers
§
additionals: Option<LookupRecords>Optional set of LookupRecords
Resolved(Lookup)
Available on crate feature
resolver only.Records resulting from a resolver lookup
Response(Message)
A response message
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
Iterates over the records from the Authority section, if present.
Sourcepub fn additionals(&self) -> Option<LookupRecordsIter<'_>>
pub fn additionals(&self) -> Option<LookupRecordsIter<'_>>
Iterates over the records from the Additional section, if present.
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§
Source§impl Debug for AuthLookup
impl Debug for AuthLookup
Source§impl Default for AuthLookup
impl Default for AuthLookup
Source§fn default() -> AuthLookup
fn default() -> AuthLookup
Returns the “default value” for a type. Read more
Source§impl From<Lookup> for AuthLookup
Available on crate feature resolver only.
impl From<Lookup> for AuthLookup
Available on crate feature
resolver only.Source§impl From<LookupRecords> for AuthLookup
impl From<LookupRecords> for AuthLookup
Source§fn from(lookup: LookupRecords) -> Self
fn from(lookup: LookupRecords) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for AuthLookup
impl RefUnwindSafe for AuthLookup
impl Send for AuthLookup
impl Sync for AuthLookup
impl Unpin for AuthLookup
impl UnsafeUnpin for AuthLookup
impl UnwindSafe for AuthLookup
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> 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