Skip to main content

ParamEnum

Trait ParamEnum 

Source
pub trait ParamEnum:
    Clone
    + Copy
    + Send
    + Sync
    + 'static {
    // Required methods
    fn from_index(index: usize) -> Self;
    fn to_index(&self) -> usize;
    fn name(&self) -> &'static str;
    fn variant_count() -> usize;
    fn variant_names() -> &'static [&'static str];
}
Expand description

Trait for enums used as parameters.

Required Methods§

Source

fn from_index(index: usize) -> Self

Source

fn to_index(&self) -> usize

Source

fn name(&self) -> &'static str

Source

fn variant_count() -> usize

Source

fn variant_names() -> &'static [&'static str]

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§