#[non_exhaustive]pub struct DnsRequestOptions {
pub use_edns: bool,
pub edns_payload_len: u16,
pub edns_set_dnssec_ok: bool,
pub max_request_depth: usize,
pub recursion_desired: bool,
pub case_randomization: bool,
pub retry_interval: Duration,
}Expand description
A set of options for expressing options to how requests should be treated
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.use_edns: boolWhen true, will add EDNS options to the request.
edns_payload_len: u16EDNS UDP payload size.
Sets the requestor’s UDP payload size in the EDNS(0) OPT pseudo-RR in outgoing requests. This tells other servers when they need to truncate their responses. Smaller payload sizes require more queries with large responses to be retried over TCP, while larger payload sizes lead to large responses being fragmented or dropped if they exceed the MTU of a network.
See https://www.dnsflagday.net/2020/ and RFC 9715 for discussion.
edns_set_dnssec_ok: boolWhen true, sets the DO bit in the EDNS options
max_request_depth: usizeSpecifies maximum request depth for DNSSEC validation.
recursion_desired: boolset recursion desired (or not) for any requests
case_randomization: boolRandomize case of query name, and check that the response matches, for spoofing resistance.
retry_interval: DurationRetry interval for unreliable transport protocols (plain UDP). Any value lower than the retry_interval_floor value set by a protocol implementer will effectively be ignored, but higher values will result in less frequent retries.
Trait Implementations§
Source§impl Clone for DnsRequestOptions
impl Clone for DnsRequestOptions
Source§fn clone(&self) -> DnsRequestOptions
fn clone(&self) -> DnsRequestOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DnsRequestOptions
impl Debug for DnsRequestOptions
Source§impl Default for DnsRequestOptions
impl Default for DnsRequestOptions
Source§impl PartialEq for DnsRequestOptions
impl PartialEq for DnsRequestOptions
Source§fn eq(&self, other: &DnsRequestOptions) -> bool
fn eq(&self, other: &DnsRequestOptions) -> bool
self and other values to be equal, and is used by ==.