#[non_exhaustive]pub enum Error {
Show 97 variants
ClaimMissing {
label: String,
},
AssertionMissing {
url: String,
},
AssertionEncoding(String),
AssertionDecoding(AssertionDecodeError),
AssertionInvalidRedaction,
AssertionRedactionNotFound,
AssertionSpecificError(String),
BadParam(String),
OperationCancelled,
ValidationRule(String),
NotImplemented(String),
ClaimEncoding,
ClaimDecoding(String),
ClaimUnsigned,
ClaimMissingSignatureBox,
ClaimVersion,
ClaimInvalidContent,
ClaimMissingHardBinding,
ClaimMultipleHardBinding,
ClaimSelfRedact,
ClaimDisallowedRedaction,
UpdateManifestInvalid,
TooManyManifestStores,
TooManyAssertions {
max: usize,
},
CoseSignatureAlgorithmNotSupported,
CoseX5ChainMissing,
CoseInvalidCert,
CoseSignature,
CoseVerifier,
CoseTimeStampGeneration,
CoseSigboxTooSmall,
CoseNoCerts,
JumbfCreationError,
ThreadReceiveError,
JumbfNotFound,
JumbfBoxNotFound,
RemoteManifestFetch(String),
RemoteManifestUrl(String),
FailedToRemoteSign,
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 + 'static>),
PrereleaseError,
VersionCompatibility(String),
InsufficientMemory,
TimeStampError(TimeStampError),
RawSignatureValidationError(RawSignatureValidationError),
RawSignerError(RawSignerError),
CertificateProfileError(CertificateProfileError),
CertificateTrustError(CertificateTrustError),
InvalidCertificateError(InvalidCertificateError),
InternalError(String),
C2PAValidation(String),
InvalidManifest(ValidationResults),
BmffError(BmffError),
GifError(GifError),
JpegError(JpegError),
Mp3Error(Mp3Error),
FlacError(FlacError),
PdfError(PdfError),
PngError(PngError),
RiffError(RiffError),
SvgError(SvgError),
TiffError(TiffError),
}Expand description
Error enumerates errors returned by most C2PA toolkit operations.
§Stability
Prior to the 1.0 release of this SDK, this type is expected to undergo
non-trivial refactoring: variants may be added, removed, renamed, or have
their payloads reshaped between minor releases. The project’s
deprecation policy
is followed on a best-effort basis pre-1.0, and Error in particular is
likely to see breaking changes ahead of 1.0 as the surface area is pared
down. Downstream code matching on specific variants should expect churn
until 1.0.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ClaimMissing
Could not find a claim with this label.
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)
OperationCancelled
The operation was cancelled by a progress callback or cancellation token.
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.
ClaimUnsigned
ClaimMissingSignatureBox
ClaimVersion
ClaimInvalidContent
ClaimMissingHardBinding
ClaimMultipleHardBinding
ClaimSelfRedact
ClaimDisallowedRedaction
UpdateManifestInvalid
TooManyManifestStores
TooManyAssertions
CoseSignatureAlgorithmNotSupported
The COSE signature uses an algorithm that is not supported by this crate.
CoseX5ChainMissing
The COSE signature did not contain a signing certificate.
CoseInvalidCert
CoseSignature
CoseVerifier
CoseTimeStampGeneration
Unable to generate a trusted time stamp.
CoseSigboxTooSmall
CoseNoCerts
JumbfCreationError
Unable to generate valid JUMBF for a claim.
ThreadReceiveError
JumbfNotFound
JumbfBoxNotFound
RemoteManifestFetch(String)
RemoteManifestUrl(String)
FailedToRemoteSign
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)
add_thumbnails only.CborError(Error)
TomlSerializationError(Error)
OtherError(Box<dyn Error + Send + Sync + 'static>)
PrereleaseError
VersionCompatibility(String)
InsufficientMemory
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)
InvalidManifest(ValidationResults)
BmffError(BmffError)
GifError(GifError)
JpegError(JpegError)
Mp3Error(Mp3Error)
FlacError(FlacError)
PdfError(PdfError)
pdf only.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) -> Self
fn from(source: HttpResolverError) -> Self
Source§impl From<ImageError> for Error
impl From<ImageError> for Error
Source§fn from(source: ImageError) -> Self
fn from(source: ImageError) -> Self
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) -> Self
fn from(never: Infallible) -> Self
Source§impl From<TryFromIntError> for Error
impl From<TryFromIntError> for Error
Source§fn from(source: TryFromIntError) -> Self
fn from(source: TryFromIntError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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,
impl<T> Read<Exclusive, BecauseExclusive> 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.