Skip to main content

EnumKind

Trait EnumKind 

Source
pub trait EnumKind: Sized {
    type Kind;

    // Required method
    fn kind(&self) -> Self::Kind;
}
Expand description

Get the kind of an enum variant.

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

Required Associated Types§

Source

type Kind

The unit kind enum representing the kinds of this enum.

Required Methods§

Source

fn kind(&self) -> Self::Kind

Returns the kind of this variant.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§