Expand description
A query for a ResourceRecord of the specified QType and Class.
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
| |
/ QNAME /
/ /
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
| QTYPE |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
| QCLASS |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
Fields
name: Name<'a>
The domain name to be queried
qtype: QType
The type of ResourceRecord being queried
class: Class
The class of ResourceRecord being queried
Implementations
sourceimpl<'a> Question<'a>
impl<'a> Question<'a>
sourcepub fn parse(
buff: &'a [u8],
start: usize
) -> Result<(Question<'a>, usize), ParseError>
pub fn parse(
buff: &'a [u8],
start: usize
) -> Result<(Question<'a>, usize), ParseError>
Parse from the specified buff
, starting at position start
.
Errors
It will error if the buffer does not contain a valid question. If the domain name in the question has been compressed the buffer should include all previous bytes from the DNS packet to be considered valid.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Question<'a>
impl<'a> Send for Question<'a>
impl<'a> Sync for Question<'a>
impl<'a> Unpin for Question<'a>
impl<'a> UnwindSafe for Question<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more