//! A non-Arc property cannot be injected use shaku::{Component, Interface, Provider}; trait DependencyTrait: Interface {} trait ComponentTrait: Interface {} trait ProviderTrait {} #[derive(Component)] #[shaku(interface = DependencyTrait)] struct DependencyImpl; impl DependencyTrait for DependencyImpl {} #[derive(Component)] #[shaku(interface = ComponentTrait)] struct ComponentImpl { #[shaku(inject)] dependency: Box, } impl ComponentTrait for ComponentImpl {} #[derive(Provider)] #[shaku(interface = ProviderTrait)] struct ProviderImpl { #[shaku(inject)] dependency: Box, } impl ProviderTrait for ProviderImpl {} fn main() {}