[−][src]Trait rocket::outcome::IntoOutcome
Conversion trait from some type into an Outcome type.
Associated Types
type Failure: Sized
The type to use when returning an Outcome::Failure.
type Forward: Sized
The type to use when returning an Outcome::Forward.
Required Methods
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>
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.
Implementations on Foreign Types
impl<S, E> IntoOutcome<S, (Status, E), ()> for Result<S, E>[src]
impl<S, E> IntoOutcome<S, (Status, E), ()> for Result<S, E>type Failure = Status
type Forward = ()
fn into_outcome(self, status: Status) -> Outcome<S, E>[src]
fn into_outcome(self, status: Status) -> Outcome<S, E>fn or_forward(self, _: ()) -> Outcome<S, E>[src]
fn or_forward(self, _: ()) -> Outcome<S, E>impl<S, E, F> IntoOutcome<S, E, F> for Option<S>[src]
impl<S, E, F> IntoOutcome<S, E, F> for Option<S>type Failure = E
type Forward = F
fn into_outcome(self, failure: E) -> Outcome<S, E, F>[src]
fn into_outcome(self, failure: E) -> Outcome<S, E, F>fn or_forward(self, forward: F) -> Outcome<S, E, F>[src]
fn or_forward(self, forward: F) -> Outcome<S, E, F>impl<'a, S, E> IntoOutcome<S, (Status, E), Data> for Result<S, E>[src]
impl<'a, S, E> IntoOutcome<S, (Status, E), Data> for Result<S, E>type Failure = Status
type Forward = Data
fn into_outcome(self, status: Status) -> Outcome<S, E>[src]
fn into_outcome(self, status: Status) -> Outcome<S, E>fn or_forward(self, data: Data) -> Outcome<S, E>[src]
fn or_forward(self, data: Data) -> Outcome<S, E>