#[non_exhaustive]pub enum SignError {
NotAnObject,
MissingIssuer,
IssuerMismatch {
vm_did: String,
issuer: String,
},
Serialize(Error),
DataIntegrity(DataIntegrityError),
}Expand description
Errors surfaced by sign_trust_task.
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.
NotAnObject
The supplied document is not a JSON object; a Trust Task document is always a top-level object (SPEC.md §4.1).
MissingIssuer
The document carries no in-band issuer member. The stock
verifier binds every proof to the in-band issuer (SPEC.md §4.7 /
§4.8), so a proof minted without one could never verify; set
issuer before signing.
IssuerMismatch
The document’s issuer is not the DID controlling the signer’s
verificationMethod. Signing would succeed cryptographically but
the emitted document would be rejected by every conforming
verifier as an issuer-spoofing attempt.
Fields
Serialize(Error)
The produced proof failed to serialise back to JSON.
DataIntegrity(DataIntegrityError)
The underlying Data Integrity signing operation failed.
Trait Implementations§
Source§impl Error for SignError
impl Error for SignError
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<DataIntegrityError> for SignError
impl From<DataIntegrityError> for SignError
Source§fn from(source: DataIntegrityError) -> Self
fn from(source: DataIntegrityError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for SignError
impl !UnwindSafe for SignError
impl Freeze for SignError
impl Send for SignError
impl Sync for SignError
impl Unpin for SignError
impl UnsafeUnpin for SignError
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>
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§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> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
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.