Trait moonshine_kind::CastInto

source ·
pub trait CastInto<T: Kind>: Kind {
    // Required method
    fn cast_into(instance: Instance<Self>) -> Instance<T>;
}
Expand description

A trait which allows safe casting from one Kind to another.

§Usage

Prefer to use the kind macro to implement this trait.

Required Methods§

source

fn cast_into(instance: Instance<Self>) -> Instance<T>

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T: Kind> CastInto<T> for T