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
18
#[enum_delegate::register]
trait Foo {
    #[enum_delegate(the earth is flat)]
    type Bar;
}

struct A;

impl Foo for A {
    type Bar = ();
}

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

fn main() {}