Enum Execution

Source
pub enum Execution<E, R = ()> {
    Failed(E),
    Completed(R),
    Skipped,
}

Variants§

§

Failed(E)

§

Completed(R)

§

Skipped

Implementations§

Source§

impl<E, R> Execution<E, R>

Source

pub fn map<V>(self, f: impl Fn(R) -> V) -> Execution<E, V>

Source

pub fn map_err<F>(self, f: impl Fn(E) -> F) -> Execution<F, R>

Source

pub fn into_result(self) -> Result<R, E>
where R: Default,

Source§

impl<R> Execution<Infallible, R>

Source

pub fn unwrap(self) -> Option<R>

Trait Implementations§

Source§

impl<E: Debug, R: Debug> Debug for Execution<E, R>

Source§

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

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

impl<E, R> Default for Execution<E, R>

Source§

fn default() -> Execution<E, R>

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

impl<E, R> From<E> for Execution<E, R>

Source§

fn from(original: E) -> Execution<E, R>

Converts to this type from the input type.
Source§

impl<E, R> FromResidual<Option<Infallible>> for Execution<E, R>

Source§

fn from_residual(residual: Option<Infallible>) -> Self

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
Source§

impl<E1: Into<E2>, E2, R> FromResidual<Result<Infallible, E1>> for Execution<E2, R>

Source§

fn from_residual(residual: Result<Infallible, E1>) -> Self

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
Source§

impl<E, R> FromResidual for Execution<E, R>

Source§

fn from_residual(residual: <Self as Try>::Residual) -> Self

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
Source§

impl<E, R> Try for Execution<E, R>

Source§

type Output = R

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value produced by ? when not short-circuiting.
Source§

type Residual = Skip<E>

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value passed to FromResidual::from_residual as part of ? when short-circuiting. Read more
Source§

fn from_output(output: Self::Output) -> Self

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from its Output type. Read more
Source§

fn branch(self) -> ControlFlow<Self::Residual, Self::Output>

🔬This is a nightly-only experimental API. (try_trait_v2)
Used in ? to decide whether the operator should produce a value (because this returned ControlFlow::Continue) or propagate a value back to the caller (because this returned ControlFlow::Break). Read more

Auto Trait Implementations§

§

impl<E, R> Freeze for Execution<E, R>
where E: Freeze, R: Freeze,

§

impl<E, R> RefUnwindSafe for Execution<E, R>

§

impl<E, R> Send for Execution<E, R>
where E: Send, R: Send,

§

impl<E, R> Sync for Execution<E, R>
where E: Sync, R: Sync,

§

impl<E, R> Unpin for Execution<E, R>
where E: Unpin, R: Unpin,

§

impl<E, R> UnwindSafe for Execution<E, R>
where E: UnwindSafe, R: 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, U> ConvertibleToMut<U> for T

Source§

fn try_as_mut(&mut self) -> Option<&mut U>

Source§

impl<T, U> ConvertibleToRef<U> for T
where &'a U: for<'a> TryFrom<&'a T>,

Source§

impl<T> From<!> for T

Source§

fn from(t: !) -> T

Converts to this type from the input type.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more