enum_delegate 0.2.0

Easily replace dynamic dispatch with an enum, for speed and serialization
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#[enum_delegate::register]
trait Foo {
    fn selfless();
}

struct A;

impl Foo for A {
    fn selfless() {}
}

#[enum_delegate::implement(Foo)]
enum E {
    A(A),
}

fn main() {}