What problem does it solve?
This Skill addresses the challenge of making generic structs injectable in Rust, enabling seamless propagation of type parameters through Provider and Injectable impls.
Core Features & Use Cases
- Generic Struct Injection: Allows generic structs to be injected with dependencies, facilitating reuse and flexibility.
- Type Propagation: Ensures type parameters are passed through to generated
Provider and Injectable impls.
- Axum Compatibility: Works seamlessly with Axum, allowing dependencies to be injected into handler signatures.
- Fail Early: Detects circular dependencies, missing registrations, and scope mismatches during container build phase.
- Testing Flexibility: Enables direct testing of constructors without the container.
Quick Start
Use the generic-injection skill to make a generic struct like 'Wrapper<T>' injectable, and resolve it with 'container.resolve::<Wrapper<Database>>()'.