Trait c2pa::AssertionBase
source · pub trait AssertionBasewhere
Self: Sized,{
const LABEL: &'static str = "unknown";
const VERSION: Option<usize> = None;
// Required methods
fn to_assertion(&self) -> Result<Assertion>;
fn from_assertion(assertion: &Assertion) -> Result<Self>;
// Provided methods
fn label(&self) -> &str { ... }
fn version(&self) -> Option<usize> { ... }
}
Expand description
The core required trait for all assertions.
This defines the label and version for the assertion and supplies the to/from converters for C2PA assertion format.
Provided Associated Constants§
Required Methods§
sourcefn to_assertion(&self) -> Result<Assertion>
fn to_assertion(&self) -> Result<Assertion>
Returns an Assertion upon success or Error otherwise.
sourcefn from_assertion(assertion: &Assertion) -> Result<Self>
fn from_assertion(assertion: &Assertion) -> Result<Self>
Returns Self or AssertionDecode Result from an assertion
Provided Methods§
Object Safety§
This trait is not object safe.