6 ms·
I don't think you get how powerful Rust's pattern matching is, or how to think of it in terms of a router. From my example above, check out https://github.com/
by dakom 2y ago
I don't think you get how powerful Rust's pattern matching is, or how to think of it in terms of a router.
From my example above, check out https://github.com/dakom/dominator-workers-fluent-auth/blob/822b5bbfb188141e3164a3321779392dc088b1b5/shared/src/backend/route.rs#L39 https://github.com/dakom/dominator-workers-fluent-auth/blob/... and follow it through to https://github.com/dakom/dominator-workers-fluent-auth/blob/822b5bbfb188141e3164a3321779392dc088b1b5/shared/src/backend/route.rs#L98 https://github.com/dakom/dominator-workers-fluent-auth/blob/...
Do you see that you have static and dynamic parts matching, multiple variable capture, etc.?
I'm not talking from a theoretical perspective. I'm showing you an actual example of a fully baked auth system that does everything on the wishlist (and more) and has no need at all for a router because Rust is itself powerful enough to do all that out of the box