A small crate that adds macros to conveniently organize Rocket route handlers in modules. This crate is not directly associated with the rocket project, although it is built upon it.
Instead of explicitly stating all routes that should be mounted... ```Rust
pub fn all_articles() {}
pub fn getarticle(id: &str) {}
pub fn postarticle(id: &str) {}
pub fn patcharticle(id: &str) {}
fn rocket() -> _ { rocket::build() .mount("/articles", routes![allarticles, getarticle, postarticle, patcharticle]) } ```
...this crate allows you to write the following:
```Rust
mod articles { // Same code as above ... }
fn rocket() -> _ { rocket::build() .mount("/articles", module!(articles)) } ```
TODO: This crate has yet to uploaded to crates.io. Will happen soon! :)
Note: Compatability of this crate was tested with Rocket version "0.5.0-rc.2", it may or may not work with previous versions.