//! Generics are supported in services #![allow(dead_code)] use shaku::{Component, Interface, Provider}; use std::sync::Arc; trait MyComponent: Interface {} trait MyProvider {} #[derive(Component)] #[shaku(interface = MyComponent)] struct MyComponentImpl { value: T, } impl MyComponent for MyComponentImpl {} #[derive(Provider)] #[shaku(interface = MyProvider)] struct MyProviderImpl { #[shaku(inject)] my_component: Arc>, } impl MyProvider for MyProviderImpl {} #[test] fn compile_ok() {}