Skip to main content

Crate purwa_macros

Crate purwa_macros 

Source
Expand description

Proc-macros for Purwa HTTP routing (#[get], #[resource], …).

Attribute Macros§

auth
#[auth(Backend)] — require a logged-in session for handlers with no parameters.
cron
#[cron] — register a scheduled enqueue into purwa-queue’s inventory.
delete
#[delete("/path")] async fn ...
get
#[get("/path")] async fn name(...) -> ...
job
#[job] — register a job payload + handler into purwa-queue’s inventory.
post
#[post("/path")] async fn ...
put
#[put("/path")] async fn ...
resource
#[resource("/prefix")] pub mod name { pub async fn index() ... pub async fn destroy() ... }