Skip to main content

EnumAll

Trait EnumAll 

Source
pub trait EnumAll: Sized {
    type All;

    const ALL: Self::All;
}
Expand description

Get an array of all variants of an enum.

Derive this trait on unit enums via #[derive(EnumAll)].

Required Associated Constants§

Source

const ALL: Self::All

An array containing all variants of the enum.

Required Associated Types§

Source

type All

Array type that holds every variant.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§