-
SummaryThis is my code --> play-back\src\lib.rs:56:38
|
56 | .route("/minecraft", get(Self::version_list))
| --- ^^^^^^^^^^^^^^^^^^ the trait `Handler<_, _>` is not implemented for fn item `fn(State<Arc<AxumSever<A, B, C, D, E>>>) -> ... {...::version_list}`
| |
| required by a bound introduced by this call
| but Self::config_get can pass check. i don't know why And, when add #[debug_handler] on config_get, it will give error error[E0401]: can't use `Self` from outer item
--> play-back\src\lib.rs:75:49
|
66 | impl<A, B, C, D, E> AxumSever<A, B, C, D, E>
| ---- `Self` type implicitly declared here, by this `impl`
...
75 | async fn config_get(State(state): State<Arc<Self>>) -> Json<Option<LauncherConfig>> {
| ^^^^
| |
| use of `Self` from outer item
| refer to the type directly here instead So why can this code be compiled? Even if it not pass debug_handler? axum version0.8.4 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
the purpose of |
Beta Was this translation helpful? Give feedback.
Don't get me wrong, I have not advised against anything.
Is your issue fixed now?