whichever 0.7.1

Implements a trait for an enum by forwarding to whichever variant it holds
Documentation
//! A stacked `#[dispatch]` is `#[dispatch(Trait, ..)]`.
#[whichever::dispatchable]
trait Shape {
    fn area(&self) -> u32;
}

struct Circle(u32);

impl Shape for Circle {
    fn area(&self) -> u32 {
        self.0
    }
}

#[whichever::dispatch(Shape)]
#[dispatch = "Shape"]
enum Kind {
    Circle(Circle),
}

fn main() {}