aboutsummaryrefslogtreecommitdiff
path: root/examples/generics/bootstrap.rs
blob: 233cd594be586b2f598da0f55fb4a9a6a335f4cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use syrette::{di_container_bind, DIContainer};

use crate::interfaces::printer::IPrinter;
use crate::printer::Printer;

pub fn bootstrap() -> DIContainer
{
    let mut di_container = DIContainer::new();

    di_container_bind!(IPrinter<String> => Printer, di_container);
    di_container_bind!(IPrinter<i32> => Printer, di_container);

    di_container
}