Trait Enum

Source
pub trait Enum: Sized {
    // Required methods
    fn from_i32(num: i32) -> Self;
    fn to_i32(&self) -> i32;
}

Required Methods§

Source

fn from_i32(num: i32) -> Self

Source

fn to_i32(&self) -> i32

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§