Trait c2pa::AssertionBase

source ·
pub trait AssertionBase
where 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§

source

const LABEL: &'static str = "unknown"

source

const VERSION: Option<usize> = None

Required Methods§

source

fn to_assertion(&self) -> Result<Assertion>

Returns an Assertion upon success or Error otherwise.

source

fn from_assertion(assertion: &Assertion) -> Result<Self>

Returns Self or AssertionDecode Result from an assertion

Provided Methods§

source

fn label(&self) -> &str

Returns a label for this assertion.

source

fn version(&self) -> Option<usize>

Returns a version for this assertion.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl AssertionBase for Actions

source§

const LABEL: &'static str = labels::ACTIONS

source§

const VERSION: Option<usize> = _

source§

impl AssertionBase for BmffHash

source§

const LABEL: &'static str = Self::LABEL

source§

const VERSION: Option<usize> = _

source§

impl AssertionBase for BoxHash

source§

const LABEL: &'static str = Self::LABEL

source§

const VERSION: Option<usize> = _

source§

impl AssertionBase for CreativeWork

source§

const LABEL: &'static str = Self::LABEL

source§

const VERSION: Option<usize> = _

source§

impl AssertionBase for DataHash

source§

const LABEL: &'static str = Self::LABEL

source§

const VERSION: Option<usize> = _

source§

impl AssertionBase for Exif

source§

const LABEL: &'static str = labels::EXIF

source§

impl AssertionBase for Metadata

source§

const LABEL: &'static str = Self::LABEL

source§

const VERSION: Option<usize> = _

source§

impl AssertionBase for SchemaDotOrg

source§

const LABEL: &'static str = labels::SCHEMA_ORG

source§

const VERSION: Option<usize> = _