Trait FromInt
from_int
pub trait FromInt { fn from_int(i: i32) -> Self; }
The trait that you derive to get YourEnum::from_int(i32).
YourEnum::from_int(i32)
fn from_int(i: i32) -> Self