pub trait VariantEnum {
type Variant: Copy + Eq + Hash;
// Required method
fn variant(&self) -> Self::Variant;
}Expand description
A trait that must be implemented by enums that are used with VariantSet.
This trait provides a way to get the variant of an enum, which is another enum that represents the variants of the original enum, but without the data.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".