Skip to main content

Crate sunweb_macros

Crate sunweb_macros 

Source
Expand description

Procedural macros for the SunWeb framework.

You should not depend on this crate directly — use [sunweb] instead, which re-exports everything from here.

Attribute Macros§

delete
Registers a function as a DELETE route handler.
error_page
Registers a custom error page handler for a specific HTTP status code.
get
Registers a function as a GET route handler.
head
Registers a function as a HEAD route handler.
middleware
Registers a middleware function that runs before or after route handlers.
options
Registers a function as an OPTIONS route handler.
patch
Registers a function as a PATCH route handler.
post
Registers a function as a POST route handler.
proxy
Registers a reverse-proxy route that forwards requests to an external URL.
put
Registers a function as a PUT route handler.
static_files
Serves all files inside a folder under a URL path prefix.

Derive Macros§

App
Derive macro that wires up your app struct with a [AppBuilder] entry point.