#[non_exhaustive]pub struct DnsConfig {
pub nameservers: Vec<IpAddress>,
pub search_domains: Vec<String>,
}Expand description
The resolver configuration observed through the active platform backend.
This is an observed resolver view, not a promise of complete persistent or per-interface DNS state. For example, Unix backends currently read the active resolver file, while Windows collects adapter-provided resolver data. Server and search-domain order is preserved as reported by the backend.
#[non_exhaustive]: platforms surface DNS configuration differently
(a flat /etc/resolv.conf on Linux/BSD/macOS vs. per-adapter DNS server
lists plus a global suffix on Windows) — this carries the subset that
maps cleanly across all of them. Marking it non-exhaustive now means
adding platform-specific fields later (e.g. per-interface resolvers) is
not a breaking change for consumers who construct a DnsConfig via
DnsConfig::new rather than a struct literal — see ARCHITECTURE.md’s
note on model extensibility.
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.nameservers: Vec<IpAddress>Nameserver addresses, in resolution order.
search_domains: Vec<String>Search-list domains appended to unqualified lookups, in order.