TrustchainResolver

Trait TrustchainResolver 

Source
pub trait TrustchainResolver: DIDResolver + AsDIDResolver {
    // Required method
    fn wrapped_resolver(&self) -> &dyn DIDResolver;

    // Provided methods
    fn transform(
        &self,
        (res_meta, doc, doc_meta): (ResolutionMetadata, Option<Document>, Option<DocumentMetadata>),
    ) -> (ResolutionMetadata, Option<Document>, Option<DocumentMetadata>) { ... }
    fn resolve_as_result<'life0, 'life1, 'async_trait>(
        &'life0 self,
        did: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = ResolverResult> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn trustchain_resolve<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        did: &'life1 str,
        input_metadata: &'life2 ResolutionInputMetadata,
    ) -> Pin<Box<dyn Future<Output = (ResolutionMetadata, Option<Document>, Option<DocumentMetadata>)> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
    fn extended_transform<'life0, 'async_trait>(
        &'life0 self,
        __arg1: (ResolutionMetadata, Option<Document>, Option<DocumentMetadata>),
    ) -> Pin<Box<dyn Future<Output = (ResolutionMetadata, Option<Document>, Option<DocumentMetadata>)> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

Trait for performing Trustchain resolution.

Required Methods§

Source

fn wrapped_resolver(&self) -> &dyn DIDResolver

Provides the wrapped resolver of the implementing type.

Provided Methods§

Source

fn transform( &self, (res_meta, doc, doc_meta): (ResolutionMetadata, Option<Document>, Option<DocumentMetadata>), ) -> (ResolutionMetadata, Option<Document>, Option<DocumentMetadata>)

Transforms the result of a DID resolution into the Trustchain format.

Source

fn resolve_as_result<'life0, 'life1, 'async_trait>( &'life0 self, did: &'life1 str, ) -> Pin<Box<dyn Future<Output = ResolverResult> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Sync Trustchain resolve function returning resolution metadata, DID document and DID document metadata from a passed DID as a Result type.

Source

fn trustchain_resolve<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, did: &'life1 str, input_metadata: &'life2 ResolutionInputMetadata, ) -> Pin<Box<dyn Future<Output = (ResolutionMetadata, Option<Document>, Option<DocumentMetadata>)> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn extended_transform<'life0, 'async_trait>( &'life0 self, __arg1: (ResolutionMetadata, Option<Document>, Option<DocumentMetadata>), ) -> Pin<Box<dyn Future<Output = (ResolutionMetadata, Option<Document>, Option<DocumentMetadata>)> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Provides implementors of this trait with a mechanism to perform additional transformations when resolving DIDs. By default this is the identity map (no transformations).

Implementors§