macro_rules! components {
($($item:tt)*) => { ... };
}Expand description
Macro to define multiple singleton dependencies
Supports both concrete types and trait implementations:
- Concrete type:
Type - Trait implementation:
Trait: ImplementationALL IMPLEMENTATION TYPES MUST IMPLEMENT THEInjectableTRAIT
§Examples
ⓘ
components!(
DatabaseService,
Logger: FileLogger,
CacheService
);