whichever 0.7.1

Implements a trait for an enum by forwarding to whichever variant it holds
Documentation
struct Circle;

impl Circle {
    fn offset(&self, x: u32, y: u32) -> u32 {
        x + y
    }
}

#[whichever::dispatch]
enum AnyShape {
    Circle(Circle),
}

#[whichever::dispatch]
impl AnyShape {
    #[dispatch(*)]
    fn offset(&self, (x, y): (u32, u32)) -> u32;
}

fn main() {}