Closed Freyskeyd closed 2 years ago
I believe the issue there is that Extend
has its own type coercion magic going on and stacking the two breaks inference. See this discussion from the initial PR to add each
.
If you can think of a way to do it, I'd probably make the API be:
#[builder(setter(each(name = "packet", into), into))]
That would avoid breaking backwards compatibility, and if there are some tradeoffs needed to make it work, this would make the author's choice explicit.
This is fixed by #234
Hello,
I'm trying to have a nice api for one of my crates and I was wondering if I could be able to have a struct like this:
I want to be able to do
session.packet(xx).packet(xx)
wherexx
implementFrom<xx> for Packet
(the into part) but it seems to not work, or theinto
isn't applied topacket
.Any idea of a workaround on that?
Thank's!