pub struct VerificationMethodDIDResolver<T, M> { /* private fields */ }

Implementations§

source§

impl<T, M> VerificationMethodDIDResolver<T, M>

source

pub fn new(resolver: T) -> Self

source

pub fn new_with_options(resolver: T, options: Options) -> Self

source

pub fn resolver(&self) -> &T

source

pub fn options(&self) -> &Options

Trait Implementations§

source§

impl<T: DIDResolver, M> ControllerProvider for VerificationMethodDIDResolver<T, M>

source§

type Controller<'a> = Document where Self: 'a

Controller reference type.
source§

async fn get_controller<'a>( &'a self, id: &'a Iri, ) -> Result<Option<Document>, ControllerError>

Returns the controller with the given identifier, if it can be found.
source§

async fn require_controller<'a>( &'a self, id: &'a Iri, ) -> Result<Self::Controller<'a>, ControllerError>

Returns the controller with the given identifier, or fails if it cannot be found.
source§

async fn allows_verification_method<'a>( &'a self, controller_id: &'a Iri, method_id: &'a Iri, proof_purposes: ProofPurposes, ) -> Result<bool, ControllerError>

Checks that the controller identified by controller_id allows the use of the verification method method_id with the given proof purposes.
source§

async fn ensure_allows_verification_method<'a>( &'a self, controller_id: &'a Iri, method_id: &'a Iri, proof_purpose: ProofPurpose, ) -> Result<(), ProofValidationError>

Ensures that the controller identified by controller_id allows the use of the verification method method_id with the given proof purposes. Read more
source§

impl<T: DIDResolver, M> DIDResolver for VerificationMethodDIDResolver<T, M>

source§

async fn resolve_representation<'a>( &'a self, did: &'a DID, options: Options, ) -> Result<Output<Vec<u8>>, Error>

Resolves a DID representation. Read more
source§

async fn resolve_with<'a>( &'a self, did: &'a DID, options: Options, ) -> Result<Output, Error>

Resolves a DID with the given options. Read more
source§

async fn resolve<'a>(&'a self, did: &'a DID) -> Result<Output, Error>

Resolves a DID. Read more
source§

async fn resolve_into_any_verification_method<'a>( &'a self, did: &'a DID, ) -> Result<Option<DIDVerificationMethod>, Error>

Resolves a DID and extracts one of the verification methods it defines. Read more
source§

async fn dereference_primary<'a>( &'a self, primary_did_url: &'a PrimaryDIDURL, ) -> Result<DerefOutput<PrimaryContent>, DerefError>

Dereference a DID URL to retrieve the primary content. Read more
source§

async fn dereference_primary_with<'a>( &'a self, primary_did_url: &'a PrimaryDIDURL, resolve_options: Options, ) -> Result<DerefOutput<PrimaryContent>, DerefError>

Dereference a DID URL to retrieve the primary content. Read more
source§

async fn dereference_primary_with_path_or_query<'a>( &'a self, _primary_did_url: &'a PrimaryDIDURL, ) -> Result<DerefOutput<PrimaryContent>, DerefError>

Dereference a DID URL with a path or query to retrieve the primary content. Read more
source§

async fn dereference_with<'a>( &'a self, did_url: &'a DIDURL, options: Options, ) -> Result<DerefOutput, DerefError>

Dereference a DID URL. Read more
source§

async fn dereference<'a>( &'a self, did_url: &'a DIDURL, ) -> Result<DerefOutput, DerefError>

Dereference a DID URL. Read more
source§

fn into_vm_resolver_with<M>( self, options: Options, ) -> VerificationMethodDIDResolver<Self, M>
where Self: Sized,

Turns this DID resolver into a verification method resolver. Read more
source§

fn into_vm_resolver<M>(self) -> VerificationMethodDIDResolver<Self, M>
where Self: Sized,

Turns this DID resolver into a verification method resolver. Read more
source§

impl<T: Default, M> Default for VerificationMethodDIDResolver<T, M>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<T: DIDResolver, M> JWKResolver for VerificationMethodDIDResolver<T, M>

source§

async fn fetch_public_jwk( &self, key_id: Option<&str>, ) -> Result<Cow<'_, JWK>, ProofValidationError>

Fetches a JWK by id. Read more
source§

impl<T: DIDResolver, M> VerificationMethodResolver for VerificationMethodDIDResolver<T, M>

source§

type Method = M

Verification method type.
source§

async fn resolve_verification_method_with( &self, _issuer: Option<&Iri>, method: Option<ReferenceOrOwnedRef<'_, M>>, options: ResolutionOptions, ) -> Result<Cow<'_, M>, VerificationMethodResolutionError>

Resolve the verification method reference.
source§

async fn resolve_verification_method( &self, issuer: Option<&Iri>, method: Option<ReferenceOrOwnedRef<'_, Self::Method>>, ) -> Result<Cow<'_, Self::Method>, VerificationMethodResolutionError>

Resolve the verification method reference with the default options.

Auto Trait Implementations§

§

impl<T, M> Freeze for VerificationMethodDIDResolver<T, M>
where T: Freeze,

§

impl<T, M> RefUnwindSafe for VerificationMethodDIDResolver<T, M>

§

impl<T, M> Send for VerificationMethodDIDResolver<T, M>
where T: Send, M: Send,

§

impl<T, M> Sync for VerificationMethodDIDResolver<T, M>
where T: Sync, M: Sync,

§

impl<T, M> Unpin for VerificationMethodDIDResolver<T, M>
where T: Unpin, M: Unpin,

§

impl<T, M> UnwindSafe for VerificationMethodDIDResolver<T, M>
where T: UnwindSafe, M: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> At for T

source§

fn at<M>(self, metadata: M) -> Meta<T, M>

Wraps self inside a Meta<Self, M> using the given metadata. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> BorrowStripped for T

source§

fn stripped(&self) -> &Stripped<T>

source§

impl<T> BorrowUnordered for T

source§

impl<T> Clear for T

source§

fn clear(&mut self)

Completely overwrites this value.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, C> FromWithContext<T, C> for T

source§

fn from_with(value: T, _context: &C) -> T

source§

impl<T> InitializableFromZeroed for T
where T: Default,

source§

unsafe fn initialize(place: *mut T)

Called to initialize a place to a valid value, after it is set to all-bits-zero. Read more
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U, C> IntoWithContext<U, C> for T
where U: FromWithContext<T, C>,

source§

fn into_with(self, context: &C) -> U

source§

impl<T> ResourceProvider<()> for T

source§

fn get_resource(&self) -> &()

Returns a reference to the resource of type T.
source§

impl<T> Same for T

source§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T

source§

type Owned = T

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U, C> TryFromWithContext<U, C> for T
where U: IntoWithContext<T, C>,

source§

type Error = Infallible

source§

fn try_from_with( value: U, context: &C, ) -> Result<T, <T as TryFromWithContext<U, C>>::Error>

source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T, U, C> TryIntoWithContext<U, C> for T
where U: TryFromWithContext<T, C>,

source§

type Error = <U as TryFromWithContext<T, C>>::Error

source§

fn try_into_with( self, context: &C, ) -> Result<U, <T as TryIntoWithContext<U, C>>::Error>

source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithContext for T
where T: ?Sized,

source§

fn with<C>(&self, context: C) -> Contextual<&T, C>

source§

fn into_with<C>(self, context: C) -> Contextual<T, C>

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more