Introduce derive(Projection)
to generate a type with the subset of the fields from the original
#130
Labels
derive(Projection)
to generate a type with the subset of the fields from the original
#130
I have such proc macro already implemented in a private repo at work. So this issue is basically a note for myself to move it to
bon
and expose as a public API here.The API of this derive looks like this:
This generates three projection type
Proj1
,Proj2
andProj3
with additionalderive(Debug, Clone)
attributes added to every projection.I'd like to improve this API a bit. Re-visit the syntax and basically re-design it with the fresh mind (it's a really old macro at this point).
This should also somehow integrate with the
bon::Builder
derives. There should be some conversion method (e.g.From
impl) to convert a projection into the partial builder or vice versa.A note for the community from the maintainers
Please vote on this issue by adding a 👍 reaction to help the maintainers with prioritizing it. You may add a comment describing your real use case related to this issue for us to better understand the problem domain.
The text was updated successfully, but these errors were encountered: