Skip to main content

app_routes

Macro app_routes 

Source
app_routes!() { /* proc-macro */ }
Expand description

Declares the application’s URL blueprint and generates its init().

Takes an optional deps( … ) { … } block — constructor-injected services and let-bindings shared across controllers — and a routes { mount => Controller … } map. Expands to an async init(…) returning the built Router: it constructs every controller, wires its dependencies, and registers each mount. See the actus crate’s top-level docs for a worked example.