Struct OneShotStatusTracker

Source
pub struct OneShotStatusTracker { /* private fields */ }
Expand description

A OneShotStatusTracker will trigger an error upon the first call to its add_error function, which is designed to abort any unnecessary computation if the overall result is unnecessary.

Trait Implementations§

Source§

impl Debug for OneShotStatusTracker

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for OneShotStatusTracker

Source§

fn default() -> OneShotStatusTracker

Returns the “default value” for a type. Read more
Source§

impl StatusTracker for OneShotStatusTracker

Source§

fn logged_items(&self) -> &[LogItem]

Return the current list of validation log items.
Source§

fn add_non_error(&mut self, log_item: LogItem)

Add a non-error LogItem to this status tracker. Read more
Source§

fn add_error<E>(&mut self, log_item: LogItem, err: E) -> Result<(), E>

Add an error-case LogItem to this status tracker. Read more
Source§

fn append(&mut self, other: &impl StatusTracker)

Appends the contents of another StatusTracker to this list of validation log items.
Source§

fn filter_errors(&mut self) -> impl Iterator<Item = &LogItem>

Return the LogItems that have error conditions (err_val is populated). Read more
Source§

fn has_status(&self, val: &str) -> bool

Return true if the validation log contains a specific C2PA status code.
Source§

fn has_error<E: Debug>(&self, err: E) -> bool

Return true if the validation log contains a specific error.
Source§

fn push_ingredient_uri<S: Into<String>>(&mut self, _uri: S)

Keeps track of the current ingredient URI, if any. Read more
Source§

fn pop_ingredient_uri(&mut self) -> Option<String>

Removes the current ingredient URI, if any.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.