aboutsummaryrefslogtreecommitdiff
path: root/examples/factory/bootstrap.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/factory/bootstrap.rs')
-rw-r--r--examples/factory/bootstrap.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/examples/factory/bootstrap.rs b/examples/factory/bootstrap.rs
index a44ccfb..b752764 100644
--- a/examples/factory/bootstrap.rs
+++ b/examples/factory/bootstrap.rs
@@ -3,15 +3,22 @@ use syrette::DIContainer;
// Interfaces
use crate::interfaces::user::{IUser, IUserFactory};
+use crate::interfaces::user_manager::IUserManager;
//
// Concrete implementations
use crate::user::User;
+use crate::user_manager::UserManager;
pub fn bootstrap() -> DIContainer
{
let mut di_container: DIContainer = DIContainer::new();
di_container
+ .bind::<dyn IUserManager>()
+ .to::<UserManager>()
+ .unwrap();
+
+ di_container
.bind::<IUserFactory>()
.to_factory(&|name, date_of_birth, password| {
let user: TransientPtr<dyn IUser> =