ActionEnum

Trait ActionEnum 

Source
pub trait ActionEnum: 'static {
    const LABELS: &'static [&'static str];
    const KEYS: &'static [char];

    // Required methods
    fn try_parse(from: char) -> Option<Self>
       where Self: Sized;
    fn action_index(&self) -> usize;
}
Expand description

Trait providing static information about action choices.

Required Associated Constants§

Source

const LABELS: &'static [&'static str]

Source

const KEYS: &'static [char]

Required Methods§

Source

fn try_parse(from: char) -> Option<Self>
where Self: Sized,

Source

fn action_index(&self) -> usize

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§

Source§

impl ActionEnum for YesNoAction

Source§

const LABELS: &'static [&'static str]

Source§

const KEYS: &'static [char]