derive_more
derive_more copied to clipboard
Generalised deriving for enums
trafficstars
As was initially proposed in #87, it would be very useful to have a general way of deriving for enums. The basic idea is that when there's an enum we all variants forward to their fields. So in case of Index something like the following would work:
#[derive(Index)]
enum VecOrSlice<'slice> {
Vec(Vec<123>)
Slice(&'slice [123])
}