Expand description
A real DNS client behind the RFC 3263 Resolver trait.
crate::resolve() implements every selection rule and knows nothing about DNS; this is the
part that actually asks. The split is what lets the selection logic — where the bugs are —
be tested against fixtures with no network.
Two things here are not just plumbing.
A failure is not an empty answer. “There is no such record” is a final answer and the next candidate should be tried; “the resolver did not respond” is a transient condition and retrying later is right. Conflating them turns a thirty-second DNS blip into a permanent routing failure, because the negative gets cached and nothing ever asks again.
Nothing here may block the endpoint loop. A lookup can take seconds; the loop it would block owns every transaction timer.
Structs§
- DnsResolver
- A DNS-backed resolver with a TTL-respecting cache.
- Prefetched
- Blocking adapter so
DnsResolvercan satisfy the synchronousResolvertrait.
Enums§
- Answer
- What a lookup produced.
Functions§
- resolve_
uri - Resolve a URI to an ordered candidate list, in one await (RFC 3263).