Struct trust_dns_server::authority::MessageRequest
source · [−]pub struct MessageRequest { /* private fields */ }
Expand description
A Message which captures the data from an inbound request
Implementations
sourceimpl 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 query(&self) -> &LowerQuery
pub fn query(&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.
sourcepub fn version(&self) -> u8
pub fn version(&self) -> u8
Return value
the version as defined in the EDNS record
Trait Implementations
sourceimpl<'q> BinDecodable<'q> for MessageRequest
impl<'q> BinDecodable<'q> for MessageRequest
sourcefn read(decoder: &mut BinDecoder<'q>) -> ProtoResult<Self>
fn read(decoder: &mut BinDecoder<'q>) -> ProtoResult<Self>
Reads a MessageRequest from the decoder
sourcefn from_bytes(bytes: &'r [u8]) -> Result<Self, ProtoError>
fn from_bytes(bytes: &'r [u8]) -> Result<Self, ProtoError>
Returns the object in binary form
sourceimpl BinEncodable for MessageRequest
impl BinEncodable for MessageRequest
sourcefn emit(&self, encoder: &mut BinEncoder<'_>) -> ProtoResult<()>
fn emit(&self, encoder: &mut BinEncoder<'_>) -> ProtoResult<()>
Write the type to the stream
sourceimpl Debug for MessageRequest
impl Debug for MessageRequest
sourceimpl PartialEq<MessageRequest> for MessageRequest
impl PartialEq<MessageRequest> for MessageRequest
sourcefn eq(&self, other: &MessageRequest) -> bool
fn eq(&self, other: &MessageRequest) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &MessageRequest) -> bool
fn ne(&self, other: &MessageRequest) -> bool
This method tests for !=
.
sourceimpl UpdateRequest for MessageRequest
impl UpdateRequest for MessageRequest
sourcefn zone(&self) -> &LowerQuery
fn zone(&self) -> &LowerQuery
Zone being updated, this should be the query of a Message
sourcefn prerequisites(&self) -> &[Record]
fn prerequisites(&self) -> &[Record]
Prerequisites map to the answers of a Message
sourcefn additionals(&self) -> &[Record]
fn additionals(&self) -> &[Record]
Additional records
impl StructuralPartialEq for MessageRequest
Auto Trait Implementations
impl RefUnwindSafe for MessageRequest
impl Send for MessageRequest
impl Sync for MessageRequest
impl Unpin for MessageRequest
impl UnwindSafe for MessageRequest
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more