Skip to main content

Crate modo_macros

Crate modo_macros 

Source

Macros§

t
Translates a localisation key using the i18n runtime.

Attribute Macros§

error_handler
Registers a sync function as the application-wide custom error handler.
handler
Registers an async function as an HTTP route handler.
main
Generates the application entry point from an async main function.
module
Groups handlers under a shared URL prefix and optional middleware.
template_filter
Registers a function as a named MiniJinja template filter.
template_function
Registers a function as a named MiniJinja global function.
view
Adds serde::Serialize, axum::response::IntoResponse, and ViewRender implementations to a struct, linking it to a MiniJinja template.

Derive Macros§

Sanitize
Derives the modo::sanitize::Sanitize trait for a named-field struct.
Validate
Derives the modo::validate::Validate trait for a named-field struct.