Trait OutcomeError

Source
pub trait OutcomeError {
    type Error;

    // Required method
    fn consume(self) -> (Option<Outcome>, Self::Error);
}
Expand description

An error which can be extracted into an outcome.

Required Associated Types§

Source

type Error

Produced error, without attached outcome.

Required Methods§

Source

fn consume(self) -> (Option<Outcome>, Self::Error)

Consumes the error and returns an outcome and Self::Error.

Returning a None outcome should discard the item(s) silently.

Implementations on Foreign Types§

Source§

impl OutcomeError for Infallible

Source§

type Error = Infallible

Source§

fn consume(self) -> (Option<Outcome>, Self::Error)

Source§

impl<E> OutcomeError for (Option<Outcome>, E)

Source§

type Error = E

Source§

fn consume(self) -> (Option<Outcome>, Self::Error)

Source§

impl<E> OutcomeError for (Outcome, E)

Source§

type Error = E

Source§

fn consume(self) -> (Option<Outcome>, Self::Error)

Implementors§