I am using rust rocket rocket = { version = "=0.5.0-rc.2", features = ["json"] }
as my web server, today I found there is two way to start the rocket, one of the start like this:
#[rocket::main]
async fn main() {
// the rocket start logic
}
the other way look like this:
#[launch]
async fn rocket() -> _ {
// the rocket start logic
}
which one style should I use? which one is better? what should I learn from the two startup style? I am search from google but no one talk about this.