# Trait rocket::outcome::IntoOutcome

source · [−]```
pub trait IntoOutcome<S, E, F> {
type Failure: Sized;
type Forward: Sized;
fn into_outcome(self, failure: Self::Failure) -> Outcome<S, E, F>;
fn or_forward(self, forward: Self::Forward) -> Outcome<S, E, F>;
}
```

## Expand description

Conversion trait from some type into an Outcome type.

## Required Associated Types

## Required Methods

#### fn into_outcome(self, failure: Self::Failure) -> Outcome<S, E, F>

#### fn into_outcome(self, failure: Self::Failure) -> Outcome<S, E, F>

Converts `self`

into an `Outcome`

. If `self`

represents a success, an
`Outcome::Success`

is returned. Otherwise, an `Outcome::Failure`

is
returned with `failure`

as the inner value.

#### fn or_forward(self, forward: Self::Forward) -> Outcome<S, E, F>

#### fn or_forward(self, forward: Self::Forward) -> Outcome<S, E, F>

Converts `self`

into an `Outcome`

. If `self`

represents a success, an
`Outcome::Success`

is returned. Otherwise, an `Outcome::Forward`

is
returned with `forward`

as the inner value.