[][src]Macro azul_core::impl_from

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:

enum MyError<'a> {
    Bar(BarError<'a>)
    Foo(FooError<'a>)
}

impl_from!(BarError<'a>, Error::Bar);
impl_from!(BarError<'a>, Error::Bar);