Skip to main content

hook

Attribute Macro hook 

Source
#[hook]
Expand description

Marks an async function as a request hook.

Hooks can inspect and mutate request parts through PartsCtx, use RequestScope for shared/per-request state, and return apigate::HookResult.

The generated wrapper normalizes supported parameters into (&mut PartsCtx, &mut RequestScope) so route pipelines can call hooks cheaply.