#[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
Operation
Failure before a pair was captured.
RecoveryFailed
The primary operation failed and restoration also failed; hardware state is uncertain.
Fields
failed_stage: MeasureStageOriginal failing stage.
recovery_stage: MeasureStageRestoration stage that also failed.
RestoreFailed
A pair was captured, but restoration failed and hardware state is uncertain.
Fields
sample: MeasurementCaptureCaptured sample remains useful with explicit qualification.
stage: MeasureStageFailing restoration stage.
Trait Implementations§
Source§impl<E: Debug> Debug for MeasureOnceError<E>
impl<E: Debug> Debug for MeasureOnceError<E>
Source§impl<E> Display for MeasureOnceError<E>
impl<E> Display for MeasureOnceError<E>
impl<E: Eq> Eq for MeasureOnceError<E>
Source§impl<E: Error + 'static> Error for MeasureOnceError<E>
impl<E: Error + 'static> Error for MeasureOnceError<E>
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl<E> Format for MeasureOnceError<E>
Available on crate feature defmt only.
impl<E> Format for MeasureOnceError<E>
defmt only.