rocket::response

Type Alias 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>

Source§

type Error = ()

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

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.