You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I couldn't get it to work, but even if you manage to, you probably don't want to need to know the concrete type of your Db just to be able to retrieve it from the typemap. You probably want to create a concrete type Db that implements Key and contains a Box<DbTrait> (where DbTrait is what you currently call Db) which contains the actual interface. That way you can retrieve whichever Db you use using Db, not the concrete type.
This issue goes away if you use D for fetching your Db, but as far as I understand this requires you to define all of your handlers within create_server.
Could you provide an example that uses a Trait? Or do you know a repository where I can find code examples?
Here is what I'd like to do:
edit: renamed issue & changed content
The text was updated successfully, but these errors were encountered: