pub struct Question<'a> {
pub name: Name<'a>,
pub qtype: QType,
pub class: Class,
}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: QTypeThe type of ResourceRecord being queried
class: ClassThe class of ResourceRecord being queried
Implementations§
Source§impl<'a> Question<'a>
impl<'a> Question<'a>
Sourcepub fn parse(buff: &'a [u8], start: usize) -> Result<(Self, usize), ParseError>
pub fn parse(buff: &'a [u8], start: usize) -> Result<(Self, 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> Freeze for Question<'a>
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more