Crate shuttle_rocket
source ·Expand description
Shuttle service integration for the Rocket web framework.
Example
#[macro_use]
extern crate rocket;
#[get("/")]
fn index() -> &'static str {
"Hello, world!"
}
#[shuttle_runtime::main]
async fn rocket() -> shuttle_rocket::ShuttleRocket {
let rocket = rocket::build().mount("/hello", routes![index]);
Ok(rocket.into())
}Structs
- A wrapper type for rocket::Rocketrocket::Build so we can implement [shuttle_runtime::Service] for it.
Type Definitions
- The return type that should be returned from the [shuttle_runtime::main] function.