azul_core
macro_rules! impl_from { ($a:ident<$c:lifetime>, $b:ident::$enum_type:ident) => { ... }; ($a:ident, $b:ident::$enum_type:ident) => { ... }; }
Implement the From trait for any type. Example usage:
From
enum MyError<'a> { Bar(BarError<'a>) Foo(FooError<'a>) } impl_from!(BarError<'a>, Error::Bar); impl_from!(BarError<'a>, Error::Bar);