Skip to main content

Crate nova_boot_macros

Crate nova_boot_macros 

Source
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 via get/post/... attributes on impl functions.

Derive Macros§

NovaRequest
Derive macro to mark a type as a Nova request model.
NovaResponse
Derive macro to mark a type as a Nova response model.