pub enum Error {
ContentTooShort,
GenerationFailed(String),
MatchFailed(String),
Coding(String),
TagMismatch,
WatermarkUnrecoverable,
InvalidInput(String),
}Expand description
Errors produced by the text soft-binding algorithms.
Variants§
ContentTooShort
Input has too little content for the requested algorithm (e.g. not enough word boundaries to place a watermark payload).
GenerationFailed(String)
A fingerprint value could not be produced.
MatchFailed(String)
A fingerprint comparison failed.
Coding(String)
Reed-Solomon erasure coding/decoding failed.
TagMismatch
The watermark payload was present but its content-binding HMAC did not verify against the recomputed content hash (transfer or tamper).
WatermarkUnrecoverable
The watermark could not be recovered (too many stripped positions).
InvalidInput(String)
A caller-supplied argument was malformed.
Implementations§
Source§impl Error
impl Error
Sourcepub fn code(&self) -> Option<&'static str>
pub fn code(&self) -> Option<&'static str>
The registered C2PA validation status code for this error, or None
when the condition carries no status code.
Always None. This crate implements soft binding — fingerprinting and
watermarking — whose failures are not hard-binding validation outcomes.
A soft binding that does not match means the recovery path found no
candidate, not that a located manifest failed to validate, and the
specification registers no status code for that.
Every crate in this family exposes this method, so a dispatcher handling several embedding methods can ask the same question of any of them.
Sourcepub fn is_no_manifest_located(&self) -> bool
pub fn is_no_manifest_located(&self) -> bool
Whether this error means the asset carries no provenance at all.
Always false: soft binding is a recovery mechanism used after the
hard binding has already failed to locate a manifest, so it is never the
thing that decides whether an asset is unsigned.
Trait Implementations§
impl Eq for Error
Source§impl Error for Error
impl Error for Error
1.30.0 · 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()