Skip to main content

cgp_type/traits/
has_type.rs

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