the trait bound `fn(State<generic_state::AppStateGeneric<dyn_state::InMemoryUserRepo>>, axum::extract::Path<u64>) -> Result<Json<dyn_state::User>, StatusCode> {generic_handlers::get_user_generic::<dyn_state::InMemoryUserRepo>}: Handler<_, _>` is not satisfied
the following other types implement trait `Handler<T, S>`:
<axum::handler::Layered<L, H, T, S> as Handler<T, S>>
<MethodRouter<S> as Handler<(), S>>
I'm kindly requesting your suggestions from expert axum/rust developers. Thanks a lot.
There is a class of errors in axum that can be difficult figure out because of all the macro foo going on behind the scenes. I cant look at your code in detail right now, but try using this on the route thats causing the problem, it should give you a cleaner error: debug_handler in axum_macros - Rust
No necessary, that macro I sent you is meant to make those errors clearer, just slap it on top of your route handler and it will tell you the actual reason why things aren't working.
I used this macro and found the problem, handle functions has to be async but my functions not async, this is the mistake Thanks for help @jonnyso
But in generic handlers I'm getting this error: ``#[axum_macros::debug_handler] doesn't support generic functions Probably I can't use debug_handler trait on generic functions. What do you suggest?