Enum trust_dns_server::authority::AuthLookup[][src]

pub enum AuthLookup {
    Empty,
    Records {
        answers: LookupRecords,
        additionals: Option<LookupRecords>,
    },
    SOA(LookupRecords),
    AXFR {
        start_soa: LookupRecords,
        records: LookupRecords,
        end_soa: LookupRecords,
    },
}

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 of Records

answers: LookupRecords

Authoritative answers

additionals: Option<LookupRecords>

Optional set of 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 of AXFR

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)

Implementations

impl AuthLookup[src]

pub fn answers(
    answers: LookupRecords,
    additionals: Option<LookupRecords>
) -> Self
[src]

Construct an answer with additional section

pub fn is_empty(&self) -> bool[src]

Returns true if either the associated Records are empty, or this is a NameExists or NxDomain

pub fn was_empty(&self) -> bool[src]

This is an NxDomain or NameExists, and has no associated records

this consumes the iterator, and verifies it is empty

pub fn iter(&self) -> AuthLookupIter<'_>

Notable traits for AuthLookupIter<'r>

impl<'r> Iterator for AuthLookupIter<'r> type Item = &'r Record;
[src]

Conversion to an iterator

pub fn unwrap_records(self) -> LookupRecords[src]

Does not panic, but will return no records if it is not of that type

pub fn take_additionals(&mut self) -> Option<LookupRecords>[src]

Takes the additional records, leaving behind None

Trait Implementations

impl Debug for AuthLookup[src]

impl Default for AuthLookup[src]

impl From<LookupRecords> for AuthLookup[src]

impl<'a> IntoIterator for &'a AuthLookup[src]

type Item = &'a Record

The type of the elements being iterated over.

type IntoIter = AuthLookupIter<'a>

Which kind of iterator are we turning this into?

impl LookupObject for AuthLookup[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,