pub trait VariantType {
// Required method
fn variant_type_id() -> VariantScalarTypeId;
}Expand description
Trait for types that can be represented by a variant.
Note that the VariantTypeId returned by variant_type_id
must be the variant type ID of the variant returned by the corresponding
From trait implementation!
Required Methods§
Sourcefn variant_type_id() -> VariantScalarTypeId
fn variant_type_id() -> VariantScalarTypeId
The variant kind this type will be represented as.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.