Expand description
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.
§Usage
To use rocket_modules
, add it to your dependencies in your Cargo.toml
.
You should also add a dependency to rocket
(version 0.5.0
or higher) if not already present:
[dependencies]
rocket = "0.5.0"
rocket_modules = "0.1.2"
Macros§
- module
- Generates a
Vec<rocket::Route>
which contains all functions marked with a rocket route attribute. The module has to be marked with#[route_module]
.
Attribute Macros§
- route_
module - Marks a module as route module which allows it to be passed as an argument to the
module!
macro.