Struct domain::base::question::Question [−][src]
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.
fn qname(&self) -> &Self::Name
[src]
fn qtype(&self) -> Rtype
[src]
fn qclass(&self) -> Class
[src]
fn compose_question<T: OctetsBuilder>(
&self,
target: &mut T
) -> Result<(), ShortBuf> where
Self::Name: Compose,
[src]
&self,
target: &mut T
) -> Result<(), ShortBuf> where
Self::Name: Compose,
fn compose_question_canonical<T: OctetsBuilder>(
&self,
target: &mut T
) -> Result<(), ShortBuf> where
Self::Name: Compose,
[src]
&self,
target: &mut T
) -> Result<(), ShortBuf> where
Self::Name: Compose,
impl<N, NN> CanonicalOrd<Question<NN>> for Question<N> where
N: ToDname,
NN: ToDname,
[src]
N: ToDname,
NN: ToDname,
fn canonical_cmp(&self, other: &Question<NN>) -> Ordering
[src]
#[must_use]fn canonical_lt(&self, other: &Rhs) -> bool
[src]
#[must_use]fn canonical_le(&self, other: &Rhs) -> bool
[src]
#[must_use]fn canonical_gt(&self, other: &Rhs) -> bool
[src]
#[must_use]fn canonical_ge(&self, other: &Rhs) -> bool
[src]
impl<N: Clone> Clone for Question<N>
[src]
impl<N: ToDname> Compose for Question<N>
[src]
fn compose<T: OctetsBuilder>(&self, target: &mut T) -> Result<(), ShortBuf>
[src]
fn compose_canonical<T: OctetsBuilder>(
&self,
target: &mut T
) -> Result<(), ShortBuf>
[src]
&self,
target: &mut T
) -> Result<(), ShortBuf>
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]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<Name, SrcName> OctetsFrom<Question<SrcName>> for Question<Name> where
Name: OctetsFrom<SrcName>,
[src]
Name: OctetsFrom<SrcName>,
fn octets_from(source: Question<SrcName>) -> Result<Self, ShortBuf>
[src]
impl<N: ToDname> Ord for Question<N>
[src]
fn cmp(&self, other: &Self) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl<Ref: OctetsRef> Parse<Ref> for Question<ParsedDname<Ref>>
[src]
fn parse(parser: &mut Parser<Ref>) -> Result<Self, ParseError>
[src]
fn skip(parser: &mut Parser<Ref>) -> Result<(), ParseError>
[src]
impl<N, NN> PartialEq<Question<NN>> for Question<N> where
N: ToDname,
NN: ToDname,
[src]
N: ToDname,
NN: ToDname,
fn eq(&self, other: &Question<NN>) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<N, NN> PartialOrd<Question<NN>> for Question<N> where
N: ToDname,
NN: ToDname,
[src]
N: ToDname,
NN: ToDname,
fn partial_cmp(&self, other: &Question<NN>) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
Auto Trait Implementations
impl<N> RefUnwindSafe for Question<N> where
N: RefUnwindSafe,
N: RefUnwindSafe,
impl<N> Send for Question<N> where
N: Send,
N: Send,
impl<N> Sync for Question<N> where
N: Sync,
N: Sync,
impl<N> Unpin for Question<N> where
N: Unpin,
N: Unpin,
impl<N> UnwindSafe for Question<N> where
N: UnwindSafe,
N: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<Source, Target> OctetsInto<Target> for Source where
Target: OctetsFrom<Source>,
[src]
Target: OctetsFrom<Source>,
pub fn octets_into(Self) -> Result<Target, ShortBuf>
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,