indep
Dead simple Dependency Injection library in Rust.
Documentation
The library contains support for single- and multi-threaded environments. See examples/sync.rs and examples/async.rs respectively, everything is described there.
Put the following in your Cargo.toml
:
[]
= "*"
And the following - to the crate root:
extern crate indep;
extern crate log;
Also, depending on the sync/async version of macros, you will need several usage definitions, either:
use Rc;
use RefCell;
use ;
or
use Arc;
use RwLock;
use ;
respectively, and
use ;
in DI-enabled trait implementations, where your_mod is module in your project where the pool creation macro is applied.
Dependencies
None except log, which is used only to trace!
dependency injections.
License
- MIT