Skip to main content

DidDocFetcher

Trait DidDocFetcher 

Source
pub trait DidDocFetcher: Send + Sync {
    // Required method
    fn fetch<'life0, 'life1, 'async_trait>(
        &'life0 self,
        url: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Fetches a DID document (parsed JSON) for a resolved HTTPS URL.

Abstracted so the resolver’s parse/decode path is testable without a live network (inject a fixture). The native HTTPS+cache implementation is HttpDidDocFetcher.

Required Methods§

Source

fn fetch<'life0, 'life1, 'async_trait>( &'life0 self, url: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Fetch and parse the DID document at url (already derived from the DID).

Implementors§