ShuttleRocket

Type Alias ShuttleRocket 

Source
pub type ShuttleRocket = Result<RocketService, Error>;
Expand description

§Shuttle service integration for the Rocket web framework

§Example

use rocket::{get, routes};

#[get("/")]
fn index() -> &'static str {
    "Hello, world!"
}

#[shuttle_runtime::main]
async fn rocket() -> shuttle_rocket::ShuttleRocket {
    let rocket = rocket::build().mount("/", routes![index]);

    Ok(rocket.into())
}

Aliased Type§

pub enum ShuttleRocket {
    Ok(RocketService),
    Err(Error),
}

Variants§

§1.0.0

Ok(RocketService)

Contains the success value

§1.0.0

Err(Error)

Contains the error value