impl_try_from_int

Macro impl_try_from_int 

Source
macro_rules! impl_try_from_int {
    ($name:ty => $($int_type:ty),+ $(,)?) => { ... };
}
Expand description

Generates TryFrom implementations for multiple integer types that delegate to i64.

Used by the SQLiteEnum derive macro to avoid repetitive code.

§Example

impl_try_from_int!(MyEnum => isize, usize, i32, u32, i16, u16, i8, u8);