whichever 0.7.1

Implements a trait for an enum by forwarding to whichever variant it holds
Documentation
#[whichever::dispatchable]
trait Value {
    fn value(&self) -> u32;
}

struct A;

impl Value for A {
    fn value(&self) -> u32 {
        1
    }
}

#[whichever::dispatch(Value)]
enum Kind {
    A { inner: A },
}

fn main() {}