Skip to main content

Variants

Trait Variants 

Source
pub trait Variants<const N: usize>
where Self: Sized,
{ const VARIANTS: [Self; N]; // Required method fn variants() -> &'static [Self]; }

Required Associated Constants§

Source

const VARIANTS: [Self; N]

Required Methods§

Source

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

Returns a static reference to all variants of this enum

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§