#[non_exhaustive]pub enum Error {
Show 118 variants
ClaimMissing {
label: String,
},
AssertionUnsupportedVersion,
AssertionMissing {
url: String,
},
AssertionEncoding(String),
AssertionDecoding(AssertionDecodeError),
AssertionInvalidRedaction,
AssertionRedactionNotFound,
AssertionSpecificError(String),
BadParam(String),
MissingFeature(String),
ValidationRule(String),
NotImplemented(String),
ClaimEncoding,
ClaimDecoding(String),
ClaimAlreadySigned,
ClaimUnsigned,
ClaimMissingSignatureBox,
ClaimMissingIdentity,
ClaimVersion,
ClaimInvalidContent,
ClaimMissingHardBinding,
ClaimMultipleHardBinding,
ClaimSelfRedact,
ClaimDisallowedRedaction,
UpdateManifestInvalid,
TooManyManifestStores,
UnreferencedManifest,
InvalidCoseSignature {
coset_error: CoseError,
},
CoseSignatureAlgorithmNotSupported,
CoseMissingKey,
CoseX5ChainMissing,
CoseInvalidCert,
CoseSignature,
CoseVerifier,
CoseCertExpiration,
CoseCertRevoked,
CoseCertUntrusted,
CoseInvalidTimeStamp,
CoseTimeStampValidity,
CoseTimeStampMismatch,
CoseTimeStampGeneration,
CoseTimeStampAuthority,
CoseSigboxTooSmall,
CoseNoCerts,
WasmVerifier,
WasmRsaKeyImport(String),
WasmRsaVerification,
WasmKey,
WasmInvalidContext,
WasmNoCrypto,
WasmNoRemoteSigner,
WasmFeatureUnsupported,
JumbfCreationError,
ThreadReceiveError,
JumbfNotFound,
JumbfBoxNotFound,
RemoteManifestFetch(String),
RemoteManifestUrl(String),
FailedToFetchSettings,
FailedToRemoteSign,
LogStop,
NotFound,
UnsupportedType,
UnsupportedThumbnailFormat(String),
MissingSignerSettings,
MissingAutoCreatedActionSourceType,
EmbeddingError,
IngredientNotFound,
FileNotFound(String),
ResourceNotFound(String),
XmpReadError(String),
XmpWriteError(String),
XmpNotSupported,
ProvenanceMissing,
HashMismatch(String),
CyclicIngredients {
claim_label_path: Vec<String>,
},
ClaimVerification(String),
PdfReadError,
InvalidClaim(InvalidClaimError),
InvalidAsset(String),
JumbfParseError(JumbfParseError),
VerifiableCredentialInvalid,
InvalidEcdsaSignature,
MissingDataBox,
XmlWriteError,
UnknownAlgorithm,
InvalidSigningKey,
Utf8Error(Utf8Error),
HttpError(Error),
HttpResolverError(HttpResolverError),
TryFromIntError(TryFromIntError),
IoError(Error),
JsonError(Error),
ImageError(ImageError),
CborError(Error),
TomlSerializationError(Error),
OtherError(Box<dyn Error + Send + Sync>),
PrereleaseError,
VersionCompatibility(String),
InsufficientMemory,
OutOfRange,
TimeStampError(TimeStampError),
RawSignatureValidationError(RawSignatureValidationError),
RawSignerError(RawSignerError),
CertificateProfileError(CertificateProfileError),
CertificateTrustError(CertificateTrustError),
InvalidCertificateError(InvalidCertificateError),
InternalError(String),
C2PAValidation(String),
BmffError(BmffError),
GifError(GifError),
JpegError(JpegError),
Mp3Error(Mp3Error),
PdfError(PdfError),
PngError(PngError),
RiffError(RiffError),
SvgError(SvgError),
TiffError(TiffError),
}Expand description
Error enumerates errors returned by most C2PA toolkit operations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ClaimMissing
Could not find a claim with this label.
AssertionUnsupportedVersion
An assertion has an unsupported version
AssertionMissing
An assertion could not be found at the expected URL.
AssertionEncoding(String)
The attempt to serialize the assertion (typically to JSON or CBOR) failed.
AssertionDecoding(AssertionDecodeError)
AssertionInvalidRedaction
AssertionRedactionNotFound
AssertionSpecificError(String)
BadParam(String)
MissingFeature(String)
ValidationRule(String)
NotImplemented(String)
ClaimEncoding
The attempt to serialize the claim to CBOR failed.
ClaimDecoding(String)
The attempt to deserialize the claim from CBOR failed.
ClaimAlreadySigned
ClaimUnsigned
ClaimMissingSignatureBox
ClaimMissingIdentity
ClaimVersion
ClaimInvalidContent
ClaimMissingHardBinding
ClaimMultipleHardBinding
ClaimSelfRedact
ClaimDisallowedRedaction
UpdateManifestInvalid
TooManyManifestStores
UnreferencedManifest
InvalidCoseSignature
The COSE Sign1 structure can not be parsed.
CoseSignatureAlgorithmNotSupported
The COSE signature uses an algorithm that is not supported by this crate.
CoseMissingKey
CoseX5ChainMissing
The COSE signature did not contain a signing certificate.
CoseInvalidCert
CoseSignature
CoseVerifier
CoseCertExpiration
CoseCertRevoked
CoseCertUntrusted
CoseInvalidTimeStamp
Unable to parse the time stamp from this signature.
CoseTimeStampValidity
CoseTimeStampMismatch
The time stamp in the signature did not match the signed data.
CoseTimeStampGeneration
Unable to generate a trusted time stamp.
CoseTimeStampAuthority
CoseSigboxTooSmall
CoseNoCerts
WasmVerifier
WasmRsaKeyImport(String)
WasmRsaVerification
WasmKey
WasmInvalidContext
WasmNoCrypto
WasmNoRemoteSigner
WasmFeatureUnsupported
JumbfCreationError
Unable to generate valid JUMBF for a claim.
ThreadReceiveError
JumbfNotFound
JumbfBoxNotFound
RemoteManifestFetch(String)
RemoteManifestUrl(String)
FailedToFetchSettings
FailedToRemoteSign
LogStop
NotFound
UnsupportedType
UnsupportedThumbnailFormat(String)
MissingSignerSettings
MissingAutoCreatedActionSourceType
EmbeddingError
IngredientNotFound
FileNotFound(String)
ResourceNotFound(String)
XmpReadError(String)
XmpWriteError(String)
XmpNotSupported
ProvenanceMissing
HashMismatch(String)
CyclicIngredients
ClaimVerification(String)
PdfReadError
InvalidClaim(InvalidClaimError)
InvalidAsset(String)
JumbfParseError(JumbfParseError)
VerifiableCredentialInvalid
InvalidEcdsaSignature
Could not parse ECDSA signature. (Only appears when using WASM web crypto.)
MissingDataBox
XmlWriteError
UnknownAlgorithm
InvalidSigningKey
Utf8Error(Utf8Error)
HttpError(Error)
HttpResolverError(HttpResolverError)
TryFromIntError(TryFromIntError)
IoError(Error)
JsonError(Error)
ImageError(ImageError)
CborError(Error)
TomlSerializationError(Error)
OtherError(Box<dyn Error + Send + Sync>)
PrereleaseError
VersionCompatibility(String)
InsufficientMemory
OutOfRange
TimeStampError(TimeStampError)
RawSignatureValidationError(RawSignatureValidationError)
RawSignerError(RawSignerError)
CertificateProfileError(CertificateProfileError)
CertificateTrustError(CertificateTrustError)
InvalidCertificateError(InvalidCertificateError)
InternalError(String)
An unexpected internal error occured while requesting the time stamp response.
C2PAValidation(String)
BmffError(BmffError)
GifError(GifError)
JpegError(JpegError)
Mp3Error(Mp3Error)
PdfError(PdfError)
PngError(PngError)
RiffError(RiffError)
SvgError(SvgError)
TiffError(TiffError)
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()
Source§impl From<HttpResolverError> for Error
impl From<HttpResolverError> for Error
Source§fn from(source: HttpResolverError) -> Error
fn from(source: HttpResolverError) -> Error
Source§impl From<ImageError> for Error
impl From<ImageError> for Error
Source§fn from(source: ImageError) -> Error
fn from(source: ImageError) -> Error
Source§impl From<Infallible> for Error
Implement From<Infallible> to support infallible conversions (like ManifestDefinition -> ManifestDefinition)
impl From<Infallible> for Error
Implement From<Infallible> to support infallible conversions (like ManifestDefinition -> ManifestDefinition)
Source§fn from(never: Infallible) -> Error
fn from(never: Infallible) -> Error
Source§impl From<TryFromIntError> for Error
impl From<TryFromIntError> for Error
Source§fn from(source: TryFromIntError) -> Error
fn from(source: TryFromIntError) -> Error
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
Source§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
Source§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
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,
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,
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,
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,
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,
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,
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,
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,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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,
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,
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,
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
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
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
self, then passes self.deref() into the pipe function.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,
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
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
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
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
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
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
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
.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
.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
.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
.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
.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
.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
.tap_deref() only in debug builds, and is erased in release
builds.Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.