#[route_params]Expand description
Extracts all route parameters into a collection variable.
This attribute macro retrieves all available route parameters from the URL path and makes them available as a collection for comprehensive route parameter access.
ยงUsage
use hyperlane::*;
use hyperlane_macros::*;
// For route like "/users/{id}/posts/{post_id}"
#[route_params(params)]
async fn handle_nested_route(ctx: Context) {
for (key, value) in params {
// Process each route parameter
}
}The macro accepts a variable name that will contain all route parameters. The variable will be available as a collection in the function scope.