Rocket Modules

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.

Example

Instead of explicitly stating all routes that should be mounted... ```Rust

[get("/")]

pub fn all_articles() {}

[get("/<_id>")]

pub fn getarticle(id: &str) {}

[post("/<_id>")]

pub fn postarticle(id: &str) {}

[route(PATCH, uri = "/<_id>")]

pub fn patcharticle(id: &str) {}

[launch]

fn rocket() -> _ { rocket::build() .mount("/articles", routes![allarticles, getarticle, postarticle, patcharticle]) } ```

...this crate allows you to write the following:

```Rust

[route_module]

mod articles { // Same code as above ... }

[launch]

fn rocket() -> _ { rocket::build() .mount("/articles", module!(articles)) } ```

Installation

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.