I am shocked that Sergio maintained rocket alone for so long. I would have figured there was a team of 3-4 people working on rocket. Glad to see he is getting help!
I am shocked that Sergio maintained rocket alone for so long. I would have figured there was a team of 3-4 people working on rocket. Glad to see he is getting help!
That's just the open issue around pinning.
There are however a few open discussions around the futures/task/waker parts, from the other RFC. I just wrote down a list of the open points here: https://github.com/aturon/rfcs/pull/15#issuecomment-44549238...
Sorry I am not a webdev. Curious what these are compared to something like RoR.
Here are couple of examples (didn't test them, but they should illustrate the point):
// Simple with admin user.
#[get("/admin")]
fn admin(user: AdminUser) -> String {
// Request is made as admin user.
format!("Allowed.")
}
#[get("/admin"), rank = 2]
fn admin(user: User) -> String {
// Request is made as a normal user.
format!("Not allowed!")
}
#[get("/admin"), rank = 3]
fn admin(user: AnonymousUser) -> String {
// Request is made as a anonymous user.
format!("Please login.")
}
// More flexable, with permissions.
#[get("/article/<id>/edit")]
fn aritcle_edit(permission: PermissionEditContent, article_id: u64) -> String {
// Request is made with a user that has the correct permission.
format!("Allowed.")
}
#[get("/article/<id>/edit"), rank = 2]
fn aritcle_edit(article_id: u64) -> String {
// Request is made with a user that doesn't have the correct permission.
format!("Not allowed!")
}
// Or in single handler.
#[get("/article/<id>/edit")]
fn aritcle_edit(permission: Option<PermissionEditContent>, article_id: u64) -> String {
if permissions.is_some() {
format!("Allowed.")
} else {
format!("Not allowed!")
}
}
This is just one of the nice things that rocket brings. To know more, the guide is really good source: https://rocket.rs/v0.4/guide/.That's just my opinion, of course.
I wasn't sure if bare-bones Rust+Lamba-Rust-Runtime was already enough.
[1] https://github.com/SergioBenitez/Rocket/issues/19
edit: specify Rocket release, not Rust release