-
SummaryI'm trying to make generic router like this:
This doesn't compile with error:
But if I specify some trait implementation on handler it compiles fine:
axum version0.7.5 |
Beta Was this translation helpful? Give feedback.
Answered by
sergeda
Aug 7, 2024
Replies: 2 comments 2 replies
-
Did you try the third note in the error output concerning the debug attribute? I think it should help here. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I tried |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Adding
Sync
helped. The end result is:<T: Translator + Send + Sync + 'static>