1
 2
 3
 4
 5
 6
 7
 8
 9
10
#[cfg(feature = "derive")]
pub use finte_derive::IntEnum;

pub trait IntEnum: Sized {
    type Int;

    fn int_value(&self) -> Self::Int;

    fn try_from_int(value: Self::Int) -> Option<Self>;
}