pub struct OperationFailure { /* private fields */ }Expand description
A failure that must also report the actual externally observable effect.
Implementations§
Source§impl OperationFailure
impl OperationFailure
Sourcepub fn new(
phase: OperationPhase,
context: ErrorContext,
effect: OperationEffect,
cause: Error,
) -> Self
pub fn new( phase: OperationPhase, context: ErrorContext, effect: OperationEffect, cause: Error, ) -> Self
Record an actual failure and its observed effect.
Sourcepub const fn phase(&self) -> OperationPhase
pub const fn phase(&self) -> OperationPhase
Actual failing phase.
Sourcepub const fn context(&self) -> &ErrorContext
pub const fn context(&self) -> &ErrorContext
Known context of the failure.
Sourcepub const fn effect(&self) -> &OperationEffect
pub const fn effect(&self) -> &OperationEffect
Observable effect of the failed action.
Sourcepub fn into_cause(self) -> Error
pub fn into_cause(self) -> Error
Consume this report and return the original error.
Trait Implementations§
Source§impl Debug for OperationFailure
impl Debug for OperationFailure
Source§impl Display for OperationFailure
impl Display for OperationFailure
Source§impl Error for OperationFailure
impl Error for OperationFailure
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for OperationFailure
impl !UnwindSafe for OperationFailure
impl Forget for OperationFailure
impl Freeze for OperationFailurewhere
*const u8 is !null: Freeze,
PhantomData<PanelStep>: Freeze,
*const ArcInner<()> is !null: Freeze,
PhantomData<ArcInner<()>>: Freeze,
PhantomData<usize>: Freeze,
PhantomData<u8>: Freeze,
*const ArcInner<[u8]> is !null: Freeze,
PhantomData<ArcInner<[u8]>>: Freeze,
PhantomData<RawKey>: Freeze,
*const RawKey is !null: Freeze,
*const ArcInner<str> is !null: Freeze,
PhantomData<ArcInner<str>>: Freeze,
*const () is !null: Freeze,
PhantomData<ErrorData<CustomOwner>>: Freeze,
*const ArcInner<DiagnosticData> is !null: Freeze,
PhantomData<ArcInner<DiagnosticData>>: Freeze,
*const OperationFailure is !null: Freeze,
PhantomData<OperationFailure>: Freeze,
impl Move for OperationFailure
impl Send for OperationFailure
impl Sync for OperationFailure
impl Unpin for OperationFailure
impl UnsafeUnpin for OperationFailurewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<PanelStep>: UnsafeUnpin,
*const ArcInner<()> is !null: UnsafeUnpin,
PhantomData<ArcInner<()>>: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<[u8]> is !null: UnsafeUnpin,
PhantomData<ArcInner<[u8]>>: UnsafeUnpin,
PhantomData<RawKey>: UnsafeUnpin,
*const RawKey is !null: UnsafeUnpin,
*const ArcInner<str> is !null: UnsafeUnpin,
PhantomData<ArcInner<str>>: UnsafeUnpin,
*const () is !null: UnsafeUnpin,
PhantomData<ErrorData<CustomOwner>>: UnsafeUnpin,
*const ArcInner<DiagnosticData> is !null: UnsafeUnpin,
PhantomData<ArcInner<DiagnosticData>>: UnsafeUnpin,
*const OperationFailure is !null: UnsafeUnpin,
PhantomData<OperationFailure>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.