Struct domain::resolv::stub::conf::ResolvOptions

source ·
pub struct ResolvOptions {
Show 23 fields pub search: SearchList, pub ndots: usize, pub timeout: Duration, pub attempts: usize, pub aa_only: bool, pub use_vc: bool, pub primary: bool, pub ign_tc: bool, pub recurse: bool, pub default_names: bool, pub stay_open: bool, pub dn_search: bool, pub use_inet6: bool, pub rotate: bool, pub no_check_name: bool, pub keep_tsig: bool, pub blast: bool, pub use_bstring: bool, pub use_ip6dotint: bool, pub use_edns0: bool, pub single_request: bool, pub single_request_reopen: bool, pub no_tld_query: bool,
}
Expand description

Options for the resolver configuration.

This type contains a lot of options that influence the resolver configuration. It collects all server-indpendent options that glibc’s resolver supports. Not all of them are currently supported by this implementation.

Fields§

§search: SearchList

Search list for host-name lookup.

§ndots: usize

TODO Sortlist sortlist: ?? Number of dots before an initial absolute query is made.

§timeout: Duration

Timeout to wait for a response.

§attempts: usize

Number of retries before giving up.

§aa_only: bool

Accept authoritative answers only.

Only responses with the AA bit set will be considered. If there aren’t any, the query will fail.

This option is not currently implemented. It is likely to be eventually implemented by the query.

§use_vc: bool

Always use TCP.

This option is implemented by the query.

§primary: bool

Query primary name servers only.

This option is not currently implemented. It is unclear what exactly it is supposed to mean.

§ign_tc: bool

Ignore trunactions errors, don’t retry with TCP.

This option is implemented by the query.

§recurse: bool

Set the recursion desired bit in queries.

Enabled by default.

Implemented by the query request.

§default_names: bool

Append the default domain name to single component names.

Enabled by default.

This is not currently implemented. Instead, the resolver config’s search and ndots fields govern resolution of relative names of all kinds.

§stay_open: bool

Keep TCP connections open between queries.

This is not currently implemented.

§dn_search: bool

Search hostnames in the current domain and parent domains.

Enabled by default.

This options is not currently implemented. Instead, the resolver config’s search and ndots fields govern resolution of relative names.

§use_inet6: bool

Try AAAA query before A query and map IPv4 responses to tunnel form.

This option is not currently implemented. It is only relevant for lookup_host.

§rotate: bool

Use round-robin selection of name servers.

This option is implemented by the query.

§no_check_name: bool

Disable checking of incoming hostname and mail names.

This is not currently implemented. Or rather, this is currently always on—there is no name checking as yet.

§keep_tsig: bool

Do not strip TSIG records.

This is not currently implemented. Or rather, no records are stripped at all.

§blast: bool

Send each query simultaneously to all name servers.

This is not currently implemented. It would be a query option.

§use_bstring: bool

Use bit-label format for IPv6 reverse lookups.

Bit labels have been deprecated and consequently, this option is not implemented.

§use_ip6dotint: bool

Use ip6.int instead of the recommended ip6.arpa.

(This option is the reverse of glibc’s RES_NOIP6DOTINT option).

This option is only relevant for lookup_addr() and is implemented there already.

§use_edns0: bool

Use EDNS0.

EDNS is not yet supported.

§single_request: bool

Perform IPv4 and IPv6 lookups sequentially instead of in parallel.

This is not yet implemented but would be an option for lookup_host().

§single_request_reopen: bool

Open a new socket for each request.

This is not currently implemented.

§no_tld_query: bool

Don’t look up unqualified names as top-level-domain.

This is not currently implemented. Instead, the resolver config’s search and ndots fields govern resolution of relative names of all kinds.

Trait Implementations§

source§

impl Clone for ResolvOptions

source§

fn clone(&self) -> ResolvOptions

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ResolvOptions

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for ResolvOptions

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<Source, Target> OctetsInto<Target> for Source
where Target: OctetsFrom<Source>,

§

type Error = <Target as OctetsFrom<Source>>::Error

source§

fn try_octets_into( self, ) -> Result<Target, <Source as OctetsInto<Target>>::Error>

Performs the conversion.
source§

fn octets_into(self) -> Target
where Self::Error: Into<Infallible>,

Performs an infallible conversion.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

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
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more