strum

Trait VariantNames

Source
pub trait VariantNames {
    const VARIANTS: &'static [&'static str];
}
Expand description

A trait for retrieving the names of each variant in Enum. This trait can be autoderived by strum_macros.

Required Associated Constants§

Source

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

Names of the variants of this enum

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§