I try to use the rocket::ignite()
function like here. If I implement it in my code:
fn main() {
rocket::ignite()
.mount("/", routes![stream_controller::index])
.mount("/events", routes![stream_controller::events])
.launch();
}
the only result is this error:
error[E0425]: cannot find function `ignite` in crate `rocket`
--> src/main.rs:10:13
|
10 | rocket::ignite()
| ^^^^^^ not found in `rocket`
Do I have to import an extra module that is missing? The example code does not show an extra module. Maybe the ignite()
is deprecated? I only can use the build()
function with #[launch]
. But in many examples like rocket-jwt
they use ignite()
. I'm really confused about using the Manual Launching.