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

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

A question in a DNS message.

In DNS, a query is determined by three elements: a domain name, a record type, and a class, collectively called a question. This type represents such a question.

Questions are generic over the domain name type. For a question with a ParsedDName, parsing is implemented. Composing, meanwhile, is available with all domain name types.

In order to allow questions on the fly, in particular when creating messages via MessageBuilder, the From trait is implemented for tuples of all three elements of a question as well as for only name and record type assuming Class::In which is likely what you want, anyway.

Methods

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

Creates a new question from its constituent elements.

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

Returns the requested domain name.

Returns the requested record type.

Returns the requested class.

impl<'a> Question<ParsedDName<'a>>
[src]

Parses a question from the beginning of a parser.

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

Appends the question to a composition.

Trait Implementations

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

Formats the value using the given formatter. Read more

impl<N: Eq + DName> Eq for Question<N>
[src]

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

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl<N: Ord + DName> Ord for Question<N>
[src]

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl<N: PartialEq + DName> PartialEq for Question<N>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<N: PartialOrd + DName> PartialOrd for Question<N>
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

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

Performs the conversion.

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

Performs the conversion.

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

Formats the value using the given formatter. Read more

impl<N: DName + Octal> Octal for Question<N>
[src]

Formats the value using the given formatter.

impl<N: DName + LowerHex> LowerHex for Question<N>
[src]

Formats the value using the given formatter.

impl<N: DName + UpperHex> UpperHex for Question<N>
[src]

Formats the value using the given formatter.

impl<N: DName + Binary> Binary for Question<N>
[src]

Formats the value using the given formatter.

Auto Trait Implementations

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

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