Type Alias shuttle_rocket::ShuttleRocket
source · pub type ShuttleRocket = Result<RocketService, Error>;Expand description
Return type from the [shuttle_runtime::main] macro for a Rocket-based service.
Example
use rocket::{routes, get};
use shuttle_rocket::ShuttleRocket;
#[get("/")]
fn index() -> &'static str {
"Hello, world!"
}
#[shuttle_runtime::main]
async fn rocket() -> ShuttleRocket {
let rocket = rocket::build().mount("/", routes![index]);
Ok(rocket.into())
}Aliased Type§
enum ShuttleRocket {
Ok(RocketService),
Err(Error),
}