[][src]Trait int_enum::IntEnum

pub trait IntEnum {
    type Int: PrimInt;
    fn as_int(&self) -> Option<Self::Int>;
fn from_int(int: Self::Int) -> Option<Self>
    where
        Self: Sized
; }

Trait used for implementations of integer and enum conversions.

Associated Types

type Int: PrimInt

The primitive integer type.

Loading content...

Required methods

fn as_int(&self) -> Option<Self::Int>

Gets the integer value of the enum.

fn from_int(int: Self::Int) -> Option<Self> where
    Self: Sized

Gets the enum type for the given integer.

Loading content...

Implementors

Loading content...