DIDResolver

Trait DIDResolver 

Source
pub trait DIDResolver {
    // Required method
    fn resolve<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        did: &'life1 str,
        _options: &'life2 DIDResolutionOptions,
    ) -> Pin<Box<dyn Future<Output = ResolutionOutput> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;

    // Provided method
    fn dereference<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        did_url: &'life1 str,
        _options: &'life2 DereferencingOptions,
    ) -> Pin<Box<dyn Future<Output = DereferencingOutput> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
}
Expand description

Abstract contract for DID resolution.

See DID Resolution Specification

Required Methods§

Source

fn resolve<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, did: &'life1 str, _options: &'life2 DIDResolutionOptions, ) -> Pin<Box<dyn Future<Output = ResolutionOutput> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Resolves a DID address into its corresponding DID document.

Provided Methods§

Source

fn dereference<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, did_url: &'life1 str, _options: &'life2 DereferencingOptions, ) -> Pin<Box<dyn Future<Output = DereferencingOutput> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Dereferences a DID URL into its corresponding resource.

Implementors§

Source§

impl DIDResolver for DidKey

Source§

impl DIDResolver for DidPeer

Source§

impl<C> DIDResolver for DidWeb<C>
where C: Connect + Send + Sync + Clone + 'static,