How to lazy load with async? #2284
-
I want to lazy init a struct with async database pool once and use it everywhere
I can do this like so, but it requires to write
Trying to do
Leeds to an error:
|
Beta Was this translation helpful? Give feedback.
Answered by
davidpdrsn
Oct 22, 2023
Replies: 1 comment
-
This isn’t an axum question and seems you already got some answers on stackoverflow. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
ziimakc
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This isn’t an axum question and seems you already got some answers on stackoverflow.