Open nicolascotton opened 1 week ago
Instead of chaining provider with dependent modules like so:
#[provider] struct InitProvider; #[injectable] #[provider] struct Provider0(#[import] FooModule); #[injectable] #[provider] struct Provider1<'a>(#[import] FooModule, #[import] BarModule<'a>); let provider0: Provider0 = InitProvider.provide(); let provider1: Provider1 = provider0.provide();
We could introduce a macro to simplify the process:
#[injectable] #[provider] struct Provider<'a>(#[import] FooModule, #[import] BarModule<'a>); let provider: Provider = init!(FooModule, BarModule<'a>);
Instead of chaining provider with dependent modules like so:
We could introduce a macro to simplify the process: