macro_rules! impl_from {
($($variant:ident $(($($sub_variant:ident),*))?),* for $enum:ident) => { ... };
($($variant:ident$(<$V:ident>)?),* for $enum:ident) => { ... };
}Expand description
Generates From impls for Enum E { Foo(Foo), Bar(Bar) } enums
ยงExample
impl_from!(Struct, Union, Enum for Adt);