Is anyone actually productive in the Axum/Tower ecosystem?

98 points WinnWonn

I was investigating a couple of libraries to do various things that I need and I came across a pretty nice library with some helpers for HTMX. I explored the code a little bit and I was absolutely astounded by how much code had to be written to implement a simple layer that just checks for the presence of a header and if it's absent then direct to another URL. I mean no offense whatsoever to the author. This all looks nice and I'm definitely going to use it. But....wow. This should just be an if statement.

What am I missing here? Why is this so complicated to do a microscopic task?

https://github.com/robertwayne/axum-htmx/blob/main/src/guard.rs