Re-exports§
pub use http::App;pub use http::AppState;pub use db::Database;pub use error::AppError;pub use error::AppResult;
Modules§
Attribute Macros§
- controller
- Controller macro
- delete
- Mark a handler as a DELETE route:
#[delete("/path")] - get
- Mark a handler as a GET route:
#[get("/path")] - patch
- Mark a handler as a PATCH route:
#[patch("/path")] - post
- Mark a handler as a POST route:
#[post("/path")] - put
- Mark a handler as a PUT route:
#[put("/path")] - require_
role - Require a role — auto-injects
auth.require_role("ROLE")?;at the start of the handler. The handler must have anAuthGuardparameter. Usage:#[require_role("ROLE_ADMIN")]
Derive Macros§
- Insertable
- Derive macro that generates an
insert()method for a struct. - Updatable
- Derive macro that generates an
update()method for a struct.