pub struct At9pResolver { /* private fields */ }Expand description
did:at9p capsule resolver — turns a did:at9p:<cid> into a dialable
TransportConfig over a CapsuleSource + the GATE pipeline.
This is the injectable capsule source for the Resolver::set_global /
NetworkDiscoveryResolver seam (#873 network profile): a future network
resolver that recognizes did:at9p: peer addresses may compose this after
the capsule schema carries independently authenticated live reach.
§Fail-closed posture
The capsule must pass verify_did_at9p (canon → hash → sig), but that
proves only the genesis claim. Until an independent EndpointId is available,
even a valid capsule returns Err; other GATE and service-selection failures
also return Err, never partial or identity-derived reach.
Implementations§
Source§impl At9pResolver
impl At9pResolver
Sourcepub fn new(source: Arc<dyn CapsuleSource>) -> Self
pub fn new(source: Arc<dyn CapsuleSource>) -> Self
Build a resolver over an untrusted capsule source.
Sourcepub async fn resolve_did(
&self,
did: &str,
service: Option<&str>,
) -> Result<TransportConfig>
pub async fn resolve_did( &self, did: &str, service: Option<&str>, ) -> Result<TransportConfig>
Resolve did:at9p:<cid> to a dialable TransportConfig, selecting the
NinePExport service entry named service (default #ns).
Fetches the capsule bytes from the (untrusted) CapsuleSource, runs the
full GATE pipeline, and validates the selected reach claim. It fails
closed because the current capsule has no independent live EndpointId.
Auto Trait Implementations§
impl Freeze for At9pResolver
impl !RefUnwindSafe for At9pResolver
impl Send for At9pResolver
impl Sync for At9pResolver
impl Unpin for At9pResolver
impl UnsafeUnpin for At9pResolver
impl !UnwindSafe for At9pResolver
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more