pub struct Resolver<T: HttpTransport + ?Sized> { /* private fields */ }Expand description
A URN resolver over an injected HttpTransport. The ladder plan and verified
results are cached per instance.
Implementations§
Source§impl<T: HttpTransport> Resolver<T>
impl<T: HttpTransport> Resolver<T>
Sourcepub fn with_options(transport: T, options: ResolveOptions) -> Self
pub fn with_options(transport: T, options: ResolveOptions) -> Self
Build a resolver with explicit options.
Source§impl<T: HttpTransport + ?Sized> Resolver<T>
impl<T: HttpTransport + ?Sized> Resolver<T>
Sourcepub fn connect_url(&self) -> &str
pub fn connect_url(&self) -> &str
The connect-CTA URL for the unreachable page.
Sourcepub async fn resolve(&self, urn: &str) -> Result<ResolveOutcome>
pub async fn resolve(&self, urn: &str) -> Result<ResolveOutcome>
Resolve a DIG URN to a typed ResolveOutcome.
A cache layer sits IN FRONT of the network resolve but never weakens
fail-closed: a memory hit is process-trusted (only holds what this process
already verified); a disk hit is RE-VERIFIED against the URN’s root (a
tampered file → IntegrityFailure). Only verified Success bytes are cached.
On a miss it walks the ladder plan: a tier’s TRANSPORT failure falls through;
the LAST tier transport-unreachable → ResolveOutcome::Unreachable; a
verify/decrypt failure at any tier → ResolveOutcome::IntegrityFailure
IMMEDIATELY (never cascaded/masked); a malformed URN / not-found / rpc
protocol error → a hard Err.
Sourcepub async fn resolve_rendered(&self, urn: &str) -> Result<ResolvedData>
pub async fn resolve_rendered(&self, urn: &str) -> Result<ResolvedData>
Convenience for the webview/image path: resolve, then RENDER — verified
content for a success, or the appropriate branded text/html page for a
non-success outcome. An integrity failure renders the security page, NEVER
the unverified bytes.