PrimitiveEnumStaticStr

Trait PrimitiveEnumStaticStr 

Source
pub trait PrimitiveEnumStaticStr
where Self: Sized + Copy + PrimitiveEnum,
{ // Required methods fn to_display_str(&self) -> &'static str; fn all_variants() -> &'static [Self]; }
Expand description

Static display formatters.

Required Methods§

Source

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

Display value, same as the name of a particular variant.

Source

fn all_variants() -> &'static [Self]

A list all possible string variants.

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§