redirect

Macro redirect 

Source
redirect!() { /* proc-macro */ }
Expand description

Create a redirect to a named route with compile-time validation

§Examples

// Simple redirect
redirect!("users.index").into()

// Redirect with route parameters
redirect!("users.show").with("id", "42").into()

// Redirect with query parameters
redirect!("users.index").query("page", "1").into()

This macro validates that the route name exists at compile time. If the route doesn’t exist, you’ll get a compile error with suggestions.