You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Or you could write your own proc-macro #[derive] for types that contain Either, or maybe a macro_rules! implementation, but I think it's not something we can do from the either crate itself.
I see. Generating a blanket impl doesn't seem too bad when the arguments and return types are independent of Self or associated types, similar to trait object safety. But consider a trait like this:
A blanket impl on Either<L, R> could pass that call to the inner types, but there's no way to wrap their Option<&L> or Option<&R> to an Option<&Either<L, R>>.
I think it might be useful to implement our (object-safe) trait for either easily with some attribute macro
The text was updated successfully, but these errors were encountered: