Skip to content

Generic bound when deriving AsExpression for new array type #4588

Answered by weiznich
Zstorm999 asked this question in Q&A
Discussion options

You must be logged in to vote

The short answer is: You cannot solve this while using the derive and only using stable diesel API's. You can likely write the relevant impls on your own by relaying on the internals generated by the macro, but we don't guarantee that these API's exist in the next diesel version anymore. Tools like cargo expand or rust-analyzer let you expand macros. Such output then can be adjusted to your needs.

That written: On a conceptual level that would be something we might want to support at some point, but I don't have any good ideas how to describe the relevant information (mostly the "unbound" generic for the SQL type) for the derive.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Zstorm999
Comment options

Answer selected by Zstorm999
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants