pub enum DTGCredentialError {
Show 16 variants
UnknownCredential,
DataIntegrity(DataIntegrityError),
NotSigned,
UnknownVCVersion,
EmptyAuthorityActions,
NotAnAuthorityCredential,
AttenuationParentHasNoId,
InvalidDigest(String),
UnsupportedDigestAlgorithm(u64),
MalformedDelegation(String),
NotADelegationGrant(String),
AttenuationWidens(String),
MissingTaskContext,
Canonicalization(String),
WrongCredentialType {
expected: String,
got: String,
},
NotAMembershipGrant(String),
}Expand description
Errors related to DTG Credentials
Variants§
UnknownCredential
DataIntegrity(DataIntegrityError)
NotSigned
UnknownVCVersion
EmptyAuthorityActions
An AuthorityCredential (VAC) carried an empty actions list.
Emptiness is never a wildcard: a VAC conferring no actions confers nothing, and is rejected rather than treated as unrestricted.
NotAnAuthorityCredential
DTGCredential::attenuate was called on a credential that is not a VAC.
AttenuationParentHasNoId
Never returned. authority.parent is a digest as of Working Draft 02, so a parent VAC no longer needs an id to be attenuated. This variant will be removed in a future release.
DTGCredential::attenuate was called on a VAC with no id.
No longer produced. Working Draft 02 makes authority.parent a digest of the
parent rather than its id, precisely so that no credential needs a top-level
identifier merely in order to be referenced.
InvalidDigest(String)
A digest value was not a well-formed digestMultibase.
Either the multibase envelope or the multihash inside it failed to decode. A
sha256:<hex> value produced against Working Draft 01 lands here, which is the
intended outcome: it is reported rather than silently compared as unequal.
UnsupportedDigestAlgorithm(u64)
A digest named a hash algorithm this library does not implement.
The specification permits a governing party to require a stronger hash, and carries the algorithm in the value itself. A verifier MUST reject an algorithm it does not accept rather than treating it as a mismatch — hence a distinct error.
MalformedDelegation(String)
A DelegationCredential (VDC) was not a well-formed grant or acceptance.
NotADelegationGrant(String)
A delegation acknowledgement was built against something that is not a delegation grant.
AttenuationWidens(String)
An attenuation attempted to confer more than its parent held.
MissingTaskContext
A WitnessCredential (VWC) was missing the REQUIRED taskContext property
Canonicalization(String)
The credential could not be canonicalized (JCS, RFC 8785) for digesting
WrongCredentialType
A credential was not of the type an operation requires
NotAMembershipGrant(String)
A membership acknowledgement was built against something that is not a community-issued membership grant
Trait Implementations§
Source§impl Debug for DTGCredentialError
impl Debug for DTGCredentialError
Source§impl Display for DTGCredentialError
impl Display for DTGCredentialError
Source§impl Error for DTGCredentialError
impl Error for DTGCredentialError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()