Skip to main content

Module resolve

Module resolve 

Source
Expand description

The resolution INTERFACE — the UrnResolver trait and its typed outcomes/errors.

This crate defines the CONTRACT, not the transport: a concrete resolver (in dig-urn-resolver, the node, the browser host) implements UrnResolver over its own I/O, while this module fixes the shape every implementation shares — the three exhaustive outcomes and the catalogued error taxonomy — so consumers can depend on one stable interface.

§Three outcomes, deliberately kept distinct

IntegrityFailure (reached the network, bytes don’t verify — security) and Unreachable (couldn’t reach the network — retryable) are never conflated. A malformed URN, a not-found resource, and a reachable protocol error are hard ResolveErrors.

Structs§

ResolveOptions
Options for a resolve. All optional; a resolver applies its own §5.3-ladder defaults.
ResolvedData
The resolved bytes plus their content type. Only ever the VERIFIED content of a ResolveOutcome::Success.

Enums§

ResolveError
A hard, fail-closed resolution failure. Distinct from ResolveOutcome::Unreachable (the network-down state) and ResolveOutcome::IntegrityFailure (bytes fetched but unverifiable).
ResolveOutcome
The typed result of a resolve. The three cases are exhaustive and never conflated.

Traits§

UrnResolver
The resolution contract: turn a DigUrn into a typed ResolveOutcome.

Type Aliases§

Result
Result alias for resolution operations.