pub enum Error {
NotFound,
InvalidRecord(String),
Io(Error),
}Variants§
NotFound
No C2PA manifest record was present in the archive.
InvalidRecord(String)
A WARC record was structurally malformed.
Io(Error)
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 here. Error::NotFound means the archive carries no
provenance, which is not a failure; the other two are archive-parsing
and I/O problems that occur before any manifest is located. The
specification defines no WARC-specific codes.
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 archive carries no provenance at all, as opposed to provenance that was found and rejected.
Trait Implementations§
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)>
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()
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> 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