DidResolver

Trait DidResolver 

Source
pub trait DidResolver: Send + Sync {
    // Required methods
    fn method(&self) -> &str;
    async fn resolve(&self, did: &str) -> Result<ResolutionResult>;
}
Expand description

Trait for DID resolvers. Each DID method implements this trait.

Required Methods§

Source

fn method(&self) -> &str

The DID method this resolver handles (e.g., “key”, “web”).

Source

async fn resolve(&self, did: &str) -> Result<ResolutionResult>

Resolve a DID to its DID Document.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§