DIDMethodResolver

Trait DIDMethodResolver 

Source
pub trait DIDMethodResolver: DIDMethod {
    // Required method
    async fn resolve_method_representation<'a>(
        &'a self,
        method_specific_id: &'a str,
        options: Options,
    ) -> Result<Output<Vec<u8>>, Error>;

    // Provided method
    fn method_name(&self) -> &str { ... }
}

Required Methods§

Source

async fn resolve_method_representation<'a>( &'a self, method_specific_id: &'a str, options: Options, ) -> Result<Output<Vec<u8>>, Error>

Resolves a DID representation using a method specific identifier.

Fetches the DID document representation referenced by the input method specific identifier using the given options.

See: https://www.w3.org/TR/did-core/#did-resolution

Provided Methods§

Source

fn method_name(&self) -> &str

Returns the name of the method handled by this resolver.

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.

Implementations on Foreign Types§

Source§

impl<T: DIDMethodResolver> DIDMethodResolver for &T

Source§

fn method_name(&self) -> &str

Source§

async fn resolve_method_representation<'b>( &'b self, method_specific_id: &'b str, options: Options, ) -> Result<Output<Vec<u8>>, Error>

Implementors§