noema 0.2.0

Noema IOC and DI framework for Rust
Documentation
1
2
3
4
5
6
7
/// A trait for types that can be injected with dependencies.
/// If u can avoid write implementation and the fields only have dependencies that are also Injectable
/// u can use the `#[derive(Injectable)]` macro crate to auto implement it.
pub trait Injectable<TInjector>: Sized + Send + Sync + 'static {
    /// Inject ur values for the type
    fn inject(injector: &TInjector) -> Self;
}