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§
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]
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.