Better way to share value in middlelayer functions than using middlelayer::from_fn_with_state
?
#3212
-
SummaryI am writing an auth layer for my app and I am currently putting the auth client into the State and use it by axum version0.8.1 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
The state you pass to Also, closure captures definitely work. Feel free to post the error you're getting and I can try to explain what's wrong. |
Beta Was this translation helpful? Give feedback.
This can work. Thanks!