actix-web
actix-web copied to clipboard
add parameter for guard object for router attribute macros
Currently, guard parameter accepts guard function, not a guard object. I want to use guard object like Header("", "") in router attribute. So, I request adding a parameter for guard_obj for router attribute macros.
agree, this is useful, it can be obj_guard(like fn_guard) solved, obj_guard's value like guard::Get(), guard::Host(...),... and maybe guard in macro attribue should rename to guard_fn?,such as #[route("/multi", guard_fn="xxx"]