pub struct MessageRequest { /* private fields */ }Expand description
A Message which captures the data from an inbound request
Implementations§
Source§impl MessageRequest
impl MessageRequest
Sourcepub fn message_type(&self) -> MessageType
pub fn message_type(&self) -> MessageType
see Header::message_type()
see Header::authoritative()
Sourcepub fn recursion_desired(&self) -> bool
pub fn recursion_desired(&self) -> bool
see Header::recursion_desired()
Sourcepub fn recursion_available(&self) -> bool
pub fn recursion_available(&self) -> bool
see Header::recursion_available()
Sourcepub fn authentic_data(&self) -> bool
pub fn authentic_data(&self) -> bool
see Header::authentic_data()
Sourcepub fn checking_disabled(&self) -> bool
pub fn checking_disabled(&self) -> bool
see Header::checking_disabled()
Sourcepub fn response_code(&self) -> ResponseCode
pub fn response_code(&self) -> ResponseCode
§Return value
The ResponseCode, if this is an EDNS message then this will join the section from the OPT
record to create the EDNS ResponseCode
Sourcepub fn queries(&self) -> &[LowerQuery]
pub fn queries(&self) -> &[LowerQuery]
Question Carries the query name and other query parameters.Sourcepub fn name_servers(&self) -> &[Record]
pub fn name_servers(&self) -> &[Record]
Authority Carries RRs which describe other authoritative servers.
May optionally carry the SOA RR for the authoritative
data in the answer section.Sourcepub fn additionals(&self) -> &[Record]
pub fn additionals(&self) -> &[Record]
Additional Carries RRs which may be helpful in using the RRs in the
other sections.Sourcepub fn edns(&self) -> Option<&Edns>
pub fn edns(&self) -> Option<&Edns>
RFC 6891, EDNS(0) Extensions, April 2013
6.1.1. Basic Elements
An OPT pseudo-RR (sometimes called a meta-RR) MAY be added to the
additional data section of a request.
The OPT RR has RR type 41.
If an OPT record is present in a received request, compliant
responders MUST include an OPT record in their respective responses.
An OPT record does not carry any DNS data. It is used only to
contain control information pertaining to the question-and-answer
sequence of a specific transaction. OPT RRs MUST NOT be cached,
forwarded, or stored in or loaded from zone files.
The OPT RR MAY be placed anywhere within the additional data section.
When an OPT RR is included within any DNS message, it MUST be the
only OPT RR in that message. If a query message with more than one
OPT RR is received, a FORMERR (RCODE=1) MUST be returned. The
placement flexibility for the OPT RR does not override the need for
the TSIG or SIG(0) RRs to be the last in the additional section
whenever they are present.§Return value
Returns the EDNS record if it was found in the additional section.
Sourcepub fn max_payload(&self) -> u16
pub fn max_payload(&self) -> u16
§Return value
the max payload value as it’s defined in the EDNS section.
Trait Implementations§
Source§impl<'q> BinDecodable<'q> for MessageRequest
impl<'q> BinDecodable<'q> for MessageRequest
Source§fn read(decoder: &mut BinDecoder<'q>) -> Result<Self, ProtoError>
fn read(decoder: &mut BinDecoder<'q>) -> Result<Self, ProtoError>
Reads a MessageRequest from the decoder
Source§fn from_bytes(bytes: &'r [u8]) -> Result<Self, ProtoError>
fn from_bytes(bytes: &'r [u8]) -> Result<Self, ProtoError>
Returns the object in binary form
Source§impl BinEncodable for MessageRequest
impl BinEncodable for MessageRequest
Source§fn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>
fn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>
Write the type to the stream
Source§impl Debug for MessageRequest
impl Debug for MessageRequest
Source§impl PartialEq for MessageRequest
impl PartialEq for MessageRequest
Source§impl UpdateRequest for MessageRequest
impl UpdateRequest for MessageRequest
Source§fn zone(&self) -> Result<&LowerQuery, ProtoError>
fn zone(&self) -> Result<&LowerQuery, ProtoError>
Zone being updated, this should be the query of a Message
Source§fn prerequisites(&self) -> &[Record]
fn prerequisites(&self) -> &[Record]
Prerequisites map to the answers of a Message
Source§fn additionals(&self) -> &[Record]
fn additionals(&self) -> &[Record]
Additional records
impl StructuralPartialEq for MessageRequest
Auto Trait Implementations§
impl Freeze for MessageRequest
impl RefUnwindSafe for MessageRequest
impl Send for MessageRequest
impl Sync for MessageRequest
impl Unpin for MessageRequest
impl UnwindSafe for MessageRequest
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