pub struct HickoryTxtLookup { /* private fields */ }Expand description
A aph_core::discovery::ports::TxtRecordLookup backed by a system-
configured hickory resolver.
Send + Sync follows from the resolver’s own bounds, so one instance can
be shared across concurrent verifications without wrapping.
Implementations§
Source§impl HickoryTxtLookup
impl HickoryTxtLookup
Sourcepub fn from_system_conf() -> Result<Self, AphError>
pub fn from_system_conf() -> Result<Self, AphError>
Builds a lookup from the host’s own resolver configuration —
/etc/resolv.conf on Unix, the registry on Windows.
§Errors
APH_E008 if the system configuration cannot be read. The failure is
reported in the same opaque form as a failed query on purpose: a caller
that could distinguish “this verifier is misconfigured” from “that
notary is unreachable” by reading an error string would be reporting
its own posture to whoever chose the DID.
Sourcepub fn with_resolver(resolver: TokioAsyncResolver) -> Self
pub fn with_resolver(resolver: TokioAsyncResolver) -> Self
Builds a lookup over a resolver the caller configured.
The injection point for an adopter who already runs a resolver — a pinned recursive server, DNS-over-TLS, a shorter timeout — without having to reimplement the absence/failure split, which is the only part of this adapter that is protocol knowledge rather than plumbing.
Trait Implementations§
Source§impl TxtRecordLookup for HickoryTxtLookup
impl TxtRecordLookup for HickoryTxtLookup
Source§fn lookup_txt<'a>(
&'a self,
name: &'a str,
) -> DiscoveryFuture<'a, DiscoveryOutcome<Vec<String>>>
fn lookup_txt<'a>( &'a self, name: &'a str, ) -> DiscoveryFuture<'a, DiscoveryOutcome<Vec<String>>>
Returns EVERY TXT string at name, unparsed and unfiltered.
No pre-filtering, per the port contract: a domain legitimately holds unrelated TXT records at one name and a rotating notary holds several APH records side by side, so an adapter that dropped what it judged malformed would turn one typo in DNS into a total verification outage.
name arrives already derived by DidUrl::dns_txt_name; this adapter
does not re-derive it.