Expand description
Procedural macros used by Nova for defining REST controllers and
request/response models. These helpers provide attribute macros like
get, post, rest_controller and derive macros NovaRequest and
NovaResponse used throughout the example and plugin crates.
Attribute Macros§
- delete
- Attach a DELETE route to a free function. Usage:
#[delete("/path")]. - get
- Attach a GET route to a free function. Usage:
#[get("/path")]. - patch
- Attach a PATCH route to a free function. Usage:
#[patch("/path")]. - post
- Attach a POST route to a free function. Usage:
#[post("/path")]. - put
- Attach a PUT route to a free function. Usage:
#[put("/path")]. - rest_
controller - Marks a struct as a Nova controller. The macro currently adds a
nova_metadata()helper; route handlers are attached viaget/post/...attributes on impl functions.
Derive Macros§
- Nova
Request - Derive macro to mark a type as a Nova request model.
- Nova
Response - Derive macro to mark a type as a Nova response model.