Open qrdwtf opened 3 months ago
I'm okay with this. I think reducing the boilerplate is worth the additional complexity and I'm willing to maintain it long-term. It fits within the spirit of the library.
Are you interested in starting a draft PR for this here? I imagine that most of your downstream work should be generally transferrable, though I haven't had a chance to look through your repo yet.
That's great! Sure, I'll make a PR.
Hi!
I'd like to propose a macros feature in addition to
HxBoosted
extractor.Currently with axum-htmx we use
HxBoosted
like this:I propose to add a macro, then it will be:
What this macro does is transforming that function to:
I don't have much experience with Rust but managed to write something close to that macro in this axum-htmx-derive repo. Didn't publish yet, don't think it requires separate package - but needs to be included in axum-htmx (with feature flag).
Currently it has 2 macros:
hx_boosted_by
andhx_boosted_by_async
- if you have any idea on how it can be merged I'm here :)Let me know what you think.