Skip to main content

Variant

Trait Variant 

Source
pub trait Variant<E: Enum>: VariantCore<E> { }
Expand description

Mark a type as a newtype variant of an Enum E.

Use the newtype_enum macro to implement this trait for your enum variants.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§