-
SummaryHello, Im implementing unit testing in my axum application by mocking a database and testing the results from my handlers. I have a
Is there a better way to do this? Or should I just add the trait bounds to all my handlers? Thank you! axum version0.8.6 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
In my experience, I'm using the dynamic dispatch like this: I use |
Beta Was this translation helpful? Give feedback.
In my experience, I'm using the dynamic dispatch like this:
I use
DynDatabaseRepositoryon myEnvironmentstruct.And I put the
Environmentin theAppState.I don't need any trait bounds on all handlers with that approach.