1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//! **portaldi** is an ergonomic, lightweight and compile-time dependency injection library.
//!
//! # Features
//!
//! * Natively async support
//!   * components and traits must be `thread-safe` (`Sync + Send`).
//!   * support for asynchronous component creation.
//!
//! * Ergonomic apis
//!   * in most cases, you can use target types directly instead of using containers.  
//!   ```ignore
//!   // for a concrete type.
//!   let hoge: DI<HogeService> = HogeService::di();
//!
//!   // for a trait. (through DIProvider)
//!   let hoge: DI<dyn HogeService> = HogeServiceProvider::di();
//!   ```
//!
//! * DRY support by macros
//!   * almost boiler codes can be generated by proc macros.
//!   ```ignore
//!   #[derive(DIPortal)]
//!   struct HogeService {
//!     foo: DI<FooService>,
//!     ...,
//!   }
//!   ```
//!

pub use portaldi_core::{container::*, traits::*, types::*};
pub use portaldi_macros::*;

pub mod docs;