cgp_type/impls/
use_type.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
use core::marker::PhantomData;

use cgp_component::WithProvider;

use crate::traits::has_type::ProvideType;

pub struct UseType<Type>(pub PhantomData<Type>);

pub type WithType<Type> = WithProvider<UseType<Type>>;

impl<Context, Tag, Type> ProvideType<Context, Tag> for UseType<Type> {
    type Type = Type;
}