whichever 0.7.1

Implements a trait for an enum by forwarding to whichever variant it holds
Documentation
1
2
3
4
5
6
7
8
9
//! One `#[dispatch]` attribute per trait method.
#[whichever::dispatchable]
trait Shape {
    #[dispatch(mismatch = false)]
    #[dispatch(mismatch = true)]
    fn same(&self, other: &Self) -> bool;
}

fn main() {}