Struct ssi_vc_jose_cose::JoseVc
source · pub struct JoseVc<T = JsonCredential>(pub T);
Expand description
Payload of a JWS-secured Verifiable Credential.
Tuple Fields§
§0: T
Implementations§
source§impl<T: Serialize> JoseVc<T>
impl<T: Serialize> JoseVc<T>
sourcepub async fn sign_into_enveloped(
&self,
signer: &impl JwsSigner,
) -> Result<EnvelopedVerifiableCredential, SignatureError>
pub async fn sign_into_enveloped( &self, signer: &impl JwsSigner, ) -> Result<EnvelopedVerifiableCredential, SignatureError>
Sign a JOSE VC into an enveloped verifiable credential.
source§impl<T: DeserializeOwned> JoseVc<T>
impl<T: DeserializeOwned> JoseVc<T>
sourcepub fn decode(jws: &JwsSlice) -> Result<DecodedJws<'_, Self>, JoseDecodeError>
pub fn decode(jws: &JwsSlice) -> Result<DecodedJws<'_, Self>, JoseDecodeError>
Decode a JOSE VC.
source§impl JoseVc
impl JoseVc
sourcepub fn decode_any(
jws: &JwsSlice,
) -> Result<DecodedJws<'_, Self>, JoseDecodeError>
pub fn decode_any( jws: &JwsSlice, ) -> Result<DecodedJws<'_, Self>, JoseDecodeError>
Decode a JOSE VC with an arbitrary credential type.
Trait Implementations§
source§impl<T: Credential> Credential for JoseVc<T>
impl<T: Credential> Credential for JoseVc<T>
source§type Description = <T as Credential>::Description
type Description = <T as Credential>::Description
Description type.
source§type Subject = <T as Credential>::Subject
type Subject = <T as Credential>::Subject
Credential subject type.
type Status = <T as Credential>::Status
type Schema = <T as Credential>::Schema
type RelatedResource = <T as Credential>::RelatedResource
source§type RefreshService = <T as Credential>::RefreshService
type RefreshService = <T as Credential>::RefreshService
Refresh service. Read more
source§type TermsOfUse = <T as Credential>::TermsOfUse
type TermsOfUse = <T as Credential>::TermsOfUse
Terms of Use type. Read more
source§fn additional_types(&self) -> &[String]
fn additional_types(&self) -> &[String]
Types that are not
VerifiableCredential
. Read morefn types(&self) -> CredentialTypes<'_>
source§fn description(&self) -> Option<&Self::Description>
fn description(&self) -> Option<&Self::Description>
Details about the credential. Read more
source§fn credential_subjects(&self) -> &[Self::Subject]
fn credential_subjects(&self) -> &[Self::Subject]
Credential subject. Read more
source§fn valid_from(&self) -> Option<DateTimeStamp>
fn valid_from(&self) -> Option<DateTimeStamp>
Date and time the credential becomes valid. Read more
source§fn valid_until(&self) -> Option<DateTimeStamp>
fn valid_until(&self) -> Option<DateTimeStamp>
Date and time the credential ceases to be valid. Read more
source§fn credential_status(&self) -> &[Self::Status]
fn credential_status(&self) -> &[Self::Status]
Credential status. Read more
source§fn credential_schemas(&self) -> &[Self::Schema]
fn credential_schemas(&self) -> &[Self::Schema]
Data schemas. Read more
Integrity metadata about each resource referenced by the verifiable
credential.
fn refresh_services(&self) -> &[Self::RefreshService]
fn terms_of_use(&self) -> &[Self::TermsOfUse]
fn evidence(&self) -> &[Self::Evidence]
source§fn validate_credential<E>(&self, env: &E) -> ClaimsValiditywhere
E: DateTimeProvider,
fn validate_credential<E>(&self, env: &E) -> ClaimsValiditywhere
E: DateTimeProvider,
Validates the credential. Read more
source§impl<T: Serialize> JwsPayload for JoseVc<T>
impl<T: Serialize> JwsPayload for JoseVc<T>
source§impl<T: MaybeIdentified> MaybeIdentified for JoseVc<T>
impl<T: MaybeIdentified> MaybeIdentified for JoseVc<T>
source§impl<T: Ord> Ord for JoseVc<T>
impl<T: Ord> Ord for JoseVc<T>
source§impl<T: PartialOrd> PartialOrd for JoseVc<T>
impl<T: PartialOrd> PartialOrd for JoseVc<T>
source§impl<E, P, T: ValidateClaims<E, P>> ValidateClaims<E, P> for JoseVc<T>
impl<E, P, T: ValidateClaims<E, P>> ValidateClaims<E, P> for JoseVc<T>
fn validate_claims(&self, environment: &E, proof: &P) -> ClaimsValidity
source§impl<E, T> ValidateJwsHeader<E> for JoseVc<T>
impl<E, T> ValidateJwsHeader<E> for JoseVc<T>
fn validate_jws_header(&self, _env: &E, _header: &Header) -> ClaimsValidity
impl<T: Copy> Copy for JoseVc<T>
impl<T: Eq> Eq for JoseVc<T>
impl<T> StructuralPartialEq for JoseVc<T>
Auto Trait Implementations§
impl<T> Freeze for JoseVc<T>where
T: Freeze,
impl<T> RefUnwindSafe for JoseVc<T>where
T: RefUnwindSafe,
impl<T> Send for JoseVc<T>where
T: Send,
impl<T> Sync for JoseVc<T>where
T: Sync,
impl<T> Unpin for JoseVc<T>where
T: Unpin,
impl<T> UnwindSafe for JoseVc<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> BorrowUnordered for T
impl<T> BorrowUnordered for T
fn as_unordered(&self) -> &Unordered<T>
source§impl<T> CallHasher for T
impl<T> CallHasher for T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
fn equivalent(&self, key: &K) -> bool
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<T> FmtForward for T
impl<T> FmtForward for T
source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
Causes
self
to use its Binary
implementation when Debug
-formatted.source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
Causes
self
to use its Display
implementation when
Debug
-formatted.source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
Causes
self
to use its LowerExp
implementation when
Debug
-formatted.source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
Causes
self
to use its LowerHex
implementation when
Debug
-formatted.source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
Causes
self
to use its Octal
implementation when Debug
-formatted.source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
Causes
self
to use its Pointer
implementation when
Debug
-formatted.source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
Causes
self
to use its UpperExp
implementation when
Debug
-formatted.source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
Causes
self
to use its UpperHex
implementation when
Debug
-formatted.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T, U, C> IntoWithContext<U, C> for Twhere
U: FromWithContext<T, C>,
impl<T, U, C> IntoWithContext<U, C> for Twhere
U: FromWithContext<T, C>,
source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Pipes by value. This is generally the method you want to use. Read more
source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
Borrows
self
and passes that borrow into the pipe function. Read moresource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
Mutably borrows
self
and passes that borrow into the pipe function. Read moresource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
Borrows
self
, then passes self.as_ref()
into the pipe function.source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
Mutably borrows
self
, then passes self.as_mut()
into the pipe
function.source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
Borrows
self
, then passes self.deref()
into the pipe function.source§impl<T> PipeAsRef for T
impl<T> PipeAsRef for T
source§impl<T> PipeBorrow for T
impl<T> PipeBorrow for T
source§impl<T> PipeDeref for T
impl<T> PipeDeref for T
source§impl<T> PipeRef for T
impl<T> PipeRef for T
source§impl<T> ResourceProvider<()> for T
impl<T> ResourceProvider<()> for T
source§fn get_resource(&self) -> &()
fn get_resource(&self) -> &()
Returns a reference to the resource of type
T
.source§impl<T> Tap for T
impl<T> Tap for T
source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Immutable access to the
Borrow<B>
of a value. Read moresource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
Mutable access to the
BorrowMut<B>
of a value. Read moresource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
Immutable access to the
AsRef<R>
view of a value. Read moresource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
Mutable access to the
AsMut<R>
view of a value. Read moresource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Immutable access to the
Deref::Target
of a value. Read moresource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Mutable access to the
Deref::Target
of a value. Read moresource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
Calls
.tap()
only in debug builds, and is erased in release builds.source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
Calls
.tap_mut()
only in debug builds, and is erased in release
builds.source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
Calls
.tap_borrow()
only in debug builds, and is erased in release
builds.source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
Calls
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
Calls
.tap_ref()
only in debug builds, and is erased in release
builds.source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
Calls
.tap_ref_mut()
only in debug builds, and is erased in release
builds.source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
Calls
.tap_deref()
only in debug builds, and is erased in release
builds.source§impl<T> Tap for T
impl<T> Tap for T
source§fn tap<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&Self) -> R,
fn tap<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&Self) -> R,
Provides immutable access for inspection. Read more
source§fn tap_dbg<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&Self) -> R,
fn tap_dbg<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&Self) -> R,
Calls
tap
in debug builds, and does nothing in release builds.source§fn tap_mut<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&mut Self) -> R,
fn tap_mut<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&mut Self) -> R,
Provides mutable access for modification. Read more
source§fn tap_mut_dbg<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&mut Self) -> R,
fn tap_mut_dbg<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&mut Self) -> R,
Calls
tap_mut
in debug builds, and does nothing in release builds.source§impl<T, U> TapAsRef<U> for Twhere
U: ?Sized,
impl<T, U> TapAsRef<U> for Twhere
U: ?Sized,
source§fn tap_ref<F, R>(self, func: F) -> Self
fn tap_ref<F, R>(self, func: F) -> Self
Provides immutable access to the reference for inspection.
source§fn tap_ref_dbg<F, R>(self, func: F) -> Self
fn tap_ref_dbg<F, R>(self, func: F) -> Self
Calls
tap_ref
in debug builds, and does nothing in release builds.source§fn tap_ref_mut<F, R>(self, func: F) -> Self
fn tap_ref_mut<F, R>(self, func: F) -> Self
Provides mutable access to the reference for modification.
source§impl<T, U> TapBorrow<U> for Twhere
U: ?Sized,
impl<T, U> TapBorrow<U> for Twhere
U: ?Sized,
source§fn tap_borrow<F, R>(self, func: F) -> Self
fn tap_borrow<F, R>(self, func: F) -> Self
Provides immutable access to the borrow for inspection. Read more
source§fn tap_borrow_dbg<F, R>(self, func: F) -> Self
fn tap_borrow_dbg<F, R>(self, func: F) -> Self
Calls
tap_borrow
in debug builds, and does nothing in release builds.source§fn tap_borrow_mut<F, R>(self, func: F) -> Self
fn tap_borrow_mut<F, R>(self, func: F) -> Self
Provides mutable access to the borrow for modification.
source§impl<T> TapDeref for T
impl<T> TapDeref for T
source§fn tap_deref_dbg<F, R>(self, func: F) -> Self
fn tap_deref_dbg<F, R>(self, func: F) -> Self
Calls
tap_deref
in debug builds, and does nothing in release builds.source§fn tap_deref_mut<F, R>(self, func: F) -> Self
fn tap_deref_mut<F, R>(self, func: F) -> Self
Mutably dereferences
self
for modification.