Skip to main content

OperationFailure

Struct OperationFailure 

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

A failure that must also report the actual externally observable effect.

Implementations§

Source§

impl OperationFailure

Source

pub fn new( phase: OperationPhase, context: ErrorContext, effect: OperationEffect, cause: Error, ) -> Self

Record an actual failure and its observed effect.

Source

pub const fn phase(&self) -> OperationPhase

Actual failing phase.

Source

pub const fn context(&self) -> &ErrorContext

Known context of the failure.

Source

pub const fn effect(&self) -> &OperationEffect

Observable effect of the failed action.

Source

pub const fn cause(&self) -> &Error

The original error.

Source

pub fn into_cause(self) -> Error

Consume this report and return the original error.

Trait Implementations§

Source§

impl Debug for OperationFailure

Source§

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

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

impl Display for OperationFailure

Source§

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

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

impl Error for OperationFailure

Source§

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

👎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

Replaced by Error::source.
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

Auto Trait Implementations§

§

impl !RefUnwindSafe for OperationFailure

§

impl !UnwindSafe for OperationFailure

§

impl Forget for OperationFailure

§

impl Freeze for OperationFailure
where *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
where RawVecInner: Send, Arc<[u8]>: Send, BoxRaw<RawKey>: Send, Arc<str>: Send, Arc<()>: Send, Repr: Send, Arc<DiagnosticData>: Send, BoxRaw<OperationFailure>: Send,

§

impl Sync for OperationFailure
where RawVecInner: Sync, Arc<[u8]>: Sync, BoxRaw<RawKey>: Sync, Arc<str>: Sync, Arc<()>: Sync, Repr: Sync, Arc<DiagnosticData>: Sync, BoxRaw<OperationFailure>: Sync,

§

impl Unpin for OperationFailure
where *const u8 is !null: Unpin, Arc<[u8]>: Unpin, Box<RawKey>: Unpin, Arc<str>: Unpin, Arc<()>: Unpin, *const () is !null: Unpin, &'static SimpleMessage: Unpin, *const Custom is !null: Unpin, Arc<DiagnosticData>: Unpin, Box<OperationFailure>: Unpin,

§

impl UnsafeUnpin for OperationFailure
where *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> 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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

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

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V