hobofan / ambassador

Delegation of trait implementations via procedural macros
Apache License 2.0
251 stars 13 forks source link

Interaction with `Either`? #4

Closed hobofan closed 2 years ago

hobofan commented 4 years ago

In a recent discussion, something like delegation came up in the context of the Either type from the either crate.

It might be interesting to provide an analogue to #[delegate_remote_trait] for structs, that allows for deriving local traits for remote structs, which I guess would be a first step towards supporting Either. Another thing that would need to be checked is the usage of ambassador with generic fields/bounds (see #5).

Not sure if there is anything more that can feasibly be done to improve the usage of ambassador with such popular generic traits.