Type Alias rocket::request::Outcome

source ·
pub type Outcome<S, E> = Outcome<S, (Status, E), Status>;
Expand description

Type alias for the Outcome of a FromRequest conversion.

Aliased Type§

enum Outcome<S, E> {
    Success(S),
    Error((Status, E)),
    Forward(Status),
}

Variants§

§

Success(S)

Contains the success value.

§

Error((Status, E))

Contains the error error value.

§

Forward(Status)

Contains the value to forward on.

Trait Implementations§

source§

impl<'r, T: FromRequest<'r>> FromRequest<'r> for Outcome<T, T::Error>

source§

type Error = Infallible

The associated error to be returned if derivation fails.
source§

fn from_request<'life0, 'async_trait>( request: &'r Request<'life0>, ) -> Pin<Box<dyn Future<Output = Outcome<Self, Infallible>> + Send + 'async_trait>>
where Self: 'async_trait, 'r: 'async_trait, 'life0: 'async_trait,

Derives an instance of Self from the incoming request metadata. Read more