1 2 3 4 5 6 7 8 9 10
use cgp::macro_prelude::*; use cgp_macro::cgp_component; #[cgp_component(TypeProvider)] #[derive_delegate(UseDelegate<Tag>)] pub trait HasType<Tag> { type Type; } pub type TypeOf<Context, Tag> = <Context as HasType<Tag>>::Type;