Skip to main content

MeasureOnceError

Enum MeasureOnceError 

Source
#[non_exhaustive]
pub enum MeasureOnceError<E> { Operation { stage: MeasureStage, source: Error<E>, }, RecoveryFailed { failed_stage: MeasureStage, source: Error<E>, recovery_stage: MeasureStage, recovery_source: Error<E>, }, RestoreFailed { sample: MeasurementCapture, stage: MeasureStage, source: Error<E>, }, }
Expand description

Complete one-shot-measurement failure.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Operation

Failure before a pair was captured.

Fields

§stage: MeasureStage

Failing stage.

§source: Error<E>

Underlying driver failure.

§

RecoveryFailed

The primary operation failed and restoration also failed; hardware state is uncertain.

Fields

§failed_stage: MeasureStage

Original failing stage.

§source: Error<E>

Original failure.

§recovery_stage: MeasureStage

Restoration stage that also failed.

§recovery_source: Error<E>

Restoration failure.

§

RestoreFailed

A pair was captured, but restoration failed and hardware state is uncertain.

Fields

§sample: MeasurementCapture

Captured sample remains useful with explicit qualification.

§stage: MeasureStage

Failing restoration stage.

§source: Error<E>

Underlying driver failure.

Trait Implementations§

Source§

impl<E: Debug> Debug for MeasureOnceError<E>

Source§

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

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

impl<E> Display for MeasureOnceError<E>

Source§

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

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

impl<E: Eq> Eq for MeasureOnceError<E>

Source§

impl<E: Error + 'static> Error for MeasureOnceError<E>

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The primary failure, in every variant.

RecoveryFailed carries two errors and a chain can only express one. Reporting the recovery failure as the cause would invert what happened: the primary failure is why the operation stopped, and the recovery failure is why the device was left uncertain. The recovery error stays available as an ordinary field, which is the honest place for a second independent failure.

1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl<E> Format for MeasureOnceError<E>

Available on crate feature defmt only.
Source§

fn format(&self, f: Formatter<'_>)

Writes the defmt representation of self to fmt.
Source§

impl<E: PartialEq> PartialEq for MeasureOnceError<E>

Source§

fn eq(&self, other: &MeasureOnceError<E>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<E: PartialEq> StructuralPartialEq for MeasureOnceError<E>

Auto Trait Implementations§

§

impl<E> Freeze for MeasureOnceError<E>
where E: Freeze,

§

impl<E> RefUnwindSafe for MeasureOnceError<E>
where E: RefUnwindSafe,

§

impl<E> Send for MeasureOnceError<E>
where E: Send,

§

impl<E> Sync for MeasureOnceError<E>
where E: Sync,

§

impl<E> Unpin for MeasureOnceError<E>
where E: Unpin,

§

impl<E> UnsafeUnpin for MeasureOnceError<E>
where E: UnsafeUnpin,

§

impl<E> UnwindSafe for MeasureOnceError<E>
where E: UnwindSafe,

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.