Implement diesel::Expression
and other necessary traits for std::rc::Rc<T> where T: Expression
#4609
LucaCappelletti94
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Sounds reasonable to do. I'm happy to accept a PR that adds impls for diesel/diesel/src/expression/mod.rs Line 166 in 325b926 That should also include any other trait that provides an impl for |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I work on an rust monolithic open source research project where we employ
diesel
both for the frontend and backend. In the frontend, we employ theyew
framework, which as other web frameworks employsRc
to share non-copiable objects without cloning across the web components.Since we create our core structures only once and reuse them thorough across the project in an effort to maximize code re-usability and minimize code duplication, we would like to wrap non-copiable attributes such as
String
with anRc
.This means for instance that the following struct:
would be turned into:
which of course, at the time of writing, does not satisfy the necessary
diesel
traits.I believe it would be desirable to proceed to implement these traits in
diesel
for thestd::rc::Rc<T> where T: Expression
. If you agree, I will proceed with a PR adding this feature.Thank you for your time,
Luca
Beta Was this translation helpful? Give feedback.
All reactions