Expand description
Proc macros for the injectable DI framework.
§Provided Macros
All macros use #[injectable(...)] as the unified entry point:
#[injectable]on struct — field injection#[injectable]on impl block — constructor injection#[injectable(ctor)]on method — marks the injection constructor#[injectable(post_construct)]on method — lifecycle: runs after construction#[injectable(pre_destruct)]on method — lifecycle: runs before shutdown#[injectable(trait)]on trait — dynamic dispatch support forInject<dyn Trait>#[injectable(factory)]on fn — transforms a function into a DI-compatible async factorybind!()— creates a static binding from a trait to a concrete type
Macros§
- bind
- Macro to create a static binding from a trait to a concrete type.
- container
- Macro for compile-time dependency graph validation and container construction.
Attribute Macros§
- injectable
- Unified DI attribute macro.