pub trait CastToParent: VariantParam {
type Parent: VariantParam;
// Required method
fn cast_to_parent(&self) -> Self::Parent;
}Expand description
Types that can convert themselves to their parent in the variant hierarchy.
Required Associated Types§
Sourcetype Parent: VariantParam
type Parent: VariantParam
The parent type.
Required Methods§
Sourcefn cast_to_parent(&self) -> Self::Parent
fn cast_to_parent(&self) -> Self::Parent
Convert this value to its parent type.
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.