Replies: 2 comments 3 replies
-
No I don't think that's a good idea. The way extractors work is a core part of axum so it's really important that we control the API as much as possible and can evolve it as necessary. Extracting it into a library potentially makes things harder to change. |
Beta Was this translation helpful? Give feedback.
-
In addition to what David wrote, the "framework" here is mostly made up of traits that are very specific to HTTP. The only way to abstract over that in a way that's not HTTP-specific would be to have the framework crate expose one or more macros for declaring these traits, which would make axum's code a whole lot less readable, and defining the input format for these traits (which would likely need a bunch of configuration / extension knobs) would be far from trivial. |
Beta Was this translation helpful? Give feedback.
-
As far as I can tell, a significant part of axum, including magic functions, is a fully general dependency injection framework that doesn't have anything to do with HTTP.
Would it be a good idea to extract this framework into a separate crate?
Beta Was this translation helpful? Give feedback.
All reactions