DIDMethod

Trait DIDMethod 

Source
pub trait DIDMethod: DIDResolver {
    // Required method
    fn name() -> String;

    // Provided method
    fn resolver(&self) -> &dyn DIDResolver
       where Self: Sized { ... }
}
Expand description

Abstract contract for DID methods.

Initially thought to encompass the signatures of different operations that a DID method is optionally expected to support, it eventually turned out DID methods might be too specific in their underlying modus operandus that such signatures would be counterproductive.

Required Methods§

Source

fn name() -> String

Returns the DIDMethod’s registered name, prefixed with did:, e.g. did:key, did:web, etc.

Provided Methods§

Source

fn resolver(&self) -> &dyn DIDResolver
where Self: Sized,

Extracts the supertrait resolver object.

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§