You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, if we want to add a new generic type to the state or remove an old one, we have to adjust every route that uses the state, which can be very challenging. So let's define a macro that expands to our state and use it instead:
Sure this would be enhancement for sure, but it needs some experimenting around. It might just be quick and simple thing to add but cannot state for sure.
Yup, something like that should be done, the macro_rules needs some experimenting on how and if possible to parse the macro rules body if necessary in first place.
Consider the following state with some generic types:
Axum allows extracting the state with
impl Traits
:However, if we want to add a new generic type to the state or remove an old one, we have to adjust every route that uses the state, which can be very challenging. So let's define a
macro
that expands to our state and use it instead:Unfortunately,
utoipa
does not support either of the approaches above:The text was updated successfully, but these errors were encountered: