tyenum 0.2.1

Attribute macro for type enums.
Documentation
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` .


## Usage:

```rs
struct A;
struct B;
struct C;

#[tyenum]

enum Test {
    A,
    BB(B),
    C(C),
}
```

results in:

```rs
enum Test {
    A(A),
    BB(B),
    C(C),
}

impl Test {
    fn is<T: IsTypeOf<Test>>(&self) -> bool {
        T::is_type_of(self)
    }
}
```

and for every variant (in this example `A`):

```rs
impl From<A> for Test {
    fn from(variant: A) -> Self {
        Test::A(variant)
    }
}

impl TryFrom<Test> for A {
    type Error = TryFromTyenumError;
    fn try_from(e: Test) -> Result<Self, TryFromTyenumError> {
        if let Test::A(variant) = e {
            Ok(variant)
        } else {
            Err(TryFromTyenumError)
        }
    }
}

impl IsTypeOf<Test> for A {
    fn is_type_of(e: &Test) -> bool {
        if let Test::A(_) = e {
            true
        } else {
            false
        }
    }
}