Trait ssi_claims::VerifiableClaims
source · pub trait VerifiableClaims {
type Claims;
type Proof;
// Required methods
fn claims(&self) -> &Self::Claims;
fn proof(&self) -> &Self::Proof;
// Provided method
async fn verify<P>(
&self,
params: P,
) -> Result<Result<(), Invalid>, ProofValidationError>
where Self::Claims: ValidateClaims<P, Self::Proof>,
Self::Proof: ValidateProof<P, Self::Claims> { ... }
}
Expand description
Verifiable Claims.
Set of claims bundled with a proof.
Required Associated Types§
Required Methods§
Provided Methods§
sourceasync fn verify<P>(
&self,
params: P,
) -> Result<Result<(), Invalid>, ProofValidationError>
async fn verify<P>( &self, params: P, ) -> Result<Result<(), Invalid>, ProofValidationError>
Validates the claims and proof.
The params
argument provides all the verification parameters required
to validate the claims and proof.
§What verification parameters should I use?
It really depends on the claims type Self::Claims
and proof type
Self::Proof
, but the VerificationParameters
type is a good
starting point that should work most of the time.
§Passing the parameters by reference
If the validation traits are implemented for P
, they will be
implemented for &P
as well. This means the parameters can be passed
by move or by reference.
Object Safety§
This trait is not object safe.