enum_primitive::enum_from_primitive_impl! [-] [+] [src]

macro_rules! enum_from_primitive_impl {
    ($name:ident, $( $variant:ident )*) => {
        impl $crate::FromPrimitive for $name {
            enum_from_primitive_impl_ty! { from_i64, i64, $name, $( $variant )* }
            enum_from_primitive_impl_ty! { from_u64, u64, $name, $( $variant )* }
        }
    };
}

Helper macro for internal use by enum_from_primitive!.