The table I'm searching is fixed, and it may return values of multiple types. I want to use a generic to receive it, but the Rust compiler keeps giving me errors, and I don't know how to write the constraints for the generic. #4164
Unanswered
jiuliyemingzhi
asked this question in
Q&A
Replies: 1 comment 2 replies
-
I generally advice people not to write this kind of generic code in applications as is requires complex bounds and a good understanding of rusts trait system and diesels trait setup. I do not provide help writing such code as you need to understand yourself what's going on there to be able to maintain the result in the long run. |
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
-
Beta Was this translation helpful? Give feedback.
All reactions