Struct domain::base::question::Question[][src]

pub struct Question<N> { /* fields omitted */ }

A question in a DNS message.

In DNS, a question describes what is requested in a query. It consists of three elements: a domain name, a record type, and a class. This type represents such a question.

Questions are generic over the domain name type. When read from an actual message, a ParsedDname has to be used because the name part may be compressed.

Implementations

impl<N> Question<N>[src]

pub fn new(qname: N, qtype: Rtype, qclass: Class) -> Self[src]

Creates a new question from its three componets.

pub fn new_in(qname: N, qtype: Rtype) -> Self[src]

Creates a new question from a name and record type, assuming class IN.

pub fn into_qname(self) -> N[src]

Converts the question into the qname.

impl<N: ToDname> Question<N>[src]

pub fn qname(&self) -> &N[src]

Returns a reference to the domain nmae in the question,

pub fn qtype(&self) -> Rtype[src]

Returns the record type of the question.

pub fn qclass(&self) -> Class[src]

Returns the class of the question.

Trait Implementations

impl<Name: ToDname> AsQuestion for Question<Name>[src]

type Name = Name

The domain name used by the qname.

impl<N, NN> CanonicalOrd<Question<NN>> for Question<N> where
    N: ToDname,
    NN: ToDname
[src]

impl<N: Clone> Clone for Question<N>[src]

impl<N: ToDname> Compose for Question<N>[src]

impl<N: Copy> Copy for Question<N>[src]

impl<N: Debug> Debug for Question<N>[src]

impl<N: Display> Display for Question<N>[src]

impl<N: ToDname> Eq for Question<N>[src]

impl<N: ToDname> From<(N, Rtype, Class)> for Question<N>[src]

impl<N: ToDname> From<(N, Rtype)> for Question<N>[src]

impl<N: Hash> Hash for Question<N>[src]

impl<Name, SrcName> OctetsFrom<Question<SrcName>> for Question<Name> where
    Name: OctetsFrom<SrcName>, 
[src]

impl<N: ToDname> Ord for Question<N>[src]

impl<Ref: OctetsRef> Parse<Ref> for Question<ParsedDname<Ref>>[src]

impl<N, NN> PartialEq<Question<NN>> for Question<N> where
    N: ToDname,
    NN: ToDname
[src]

impl<N, NN> PartialOrd<Question<NN>> for Question<N> where
    N: ToDname,
    NN: ToDname
[src]

Auto Trait Implementations

impl<N> RefUnwindSafe for Question<N> where
    N: RefUnwindSafe

impl<N> Send for Question<N> where
    N: Send

impl<N> Sync for Question<N> where
    N: Sync

impl<N> Unpin for Question<N> where
    N: Unpin

impl<N> UnwindSafe for Question<N> where
    N: UnwindSafe

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<Source, Target> OctetsInto<Target> for Source where
    Target: OctetsFrom<Source>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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>,