#[non_exhaustive]pub enum SdJwtVcError {
SdJwt(SdJwtError),
MissingTyp,
UnexpectedTyp(String),
VcdmPayload,
DisclosedRegisteredClaim(String),
Claims(Error),
InvalidClaim {
claim: &'static str,
reason: String,
},
}Available on crate feature
sd-jwt only.Expand description
Why an SD-JWT is not an SD-JWT VC.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
SdJwt(SdJwtError)
The SD-JWT itself is invalid.
MissingTyp
The issuer-signed JWT has no typ.
UnexpectedTyp(String)
The typ is neither dc+sd-jwt nor vc+sd-jwt.
VcdmPayload
The typ is vc+sd-jwt and the payload has @context and no vct: a VCDM 2.0
credential secured with SD-JWT (VC-JOSE-COSE), which
SdJwtCredentialV2 parses, not an SD-JWT VC.
DisclosedRegisteredClaim(String)
A claim that must not be selectively disclosed came from a disclosure.
Claims(Error)
The processed payload is not an SD-JWT VC claims set: no vct, say. The source is the
JSON error.
InvalidClaim
A registered claim breaks a rule of SD-JWT VC.
Trait Implementations§
Source§impl Debug for SdJwtVcError
impl Debug for SdJwtVcError
Source§impl Display for SdJwtVcError
impl Display for SdJwtVcError
Source§impl Error for SdJwtVcError
impl Error for SdJwtVcError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<SdJwtError> for SdJwtVcError
impl From<SdJwtError> for SdJwtVcError
Source§fn from(source: SdJwtError) -> Self
fn from(source: SdJwtError) -> Self
Converts to this type from the input type.
Source§impl From<SdJwtVcError> for SdJwtValidationError
impl From<SdJwtVcError> for SdJwtValidationError
Source§fn from(source: SdJwtVcError) -> Self
fn from(source: SdJwtVcError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for SdJwtVcError
impl !UnwindSafe for SdJwtVcError
impl Freeze for SdJwtVcError
impl Send for SdJwtVcError
impl Sync for SdJwtVcError
impl Unpin for SdJwtVcError
impl UnsafeUnpin for SdJwtVcError
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