Attribute macro for less verbose creation of enums having different types as variants.
Also automatically implements From, TryFrom and fn is<T>() -> bool
to check if its inner item is of type T
.
```rs struct A; struct B; struct C;
enum Test { A, BB(B), C(C), } ```
results in:
```rs enum Test { A(A), BB(B), C(C), }
impl Test {
fn is
and for every variant (in this example A
):
```rs impl From for Test { fn from(variant: A) -> Self { Test::A(variant) } }
impl TryFrom
impl IsTypeOf