CastToParent

Trait CastToParent 

Source
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§

Source

type Parent: VariantParam

The parent type.

Required Methods§

Source

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.

Implementations on Foreign Types§

Source§

impl CastToParent for i32

Implementors§