Type Alias rocket::response::Result

source ·
pub type Result<'r> = Result<Response<'r>, Status>;
Expand description

Type alias for the Result of a Responder::respond_to() call.

Aliased Type§

enum Result<'r> {
    Ok(Response<'r>),
    Err(Status),
}

Variants§

§1.0.0

Ok(Response<'r>)

Contains the success value

§1.0.0

Err(Status)

Contains the error value

Trait Implementations§

source§

impl<'r, 'o: 'r> IntoOutcome<Outcome<Response<'r>, Status, (Data<'r>, Status)>> for Result<'o>

§

type Error = ()

The type to use when returning an Outcome::Error.
§

type Forward = (Data<'r>, Status)

The type to use when returning an Outcome::Forward.
source§

fn or_error(self, _: ()) -> Outcome<'r>

Converts self into an Outcome. If self represents a success, an Outcome::Success is returned. Otherwise, an Outcome::Error is returned with error as the inner value.
source§

fn or_forward(self, (data, forward): (Data<'r>, Status)) -> Outcome<'r>

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.