blob: 3a937c38c5013377b42739627d1124df3df3ee4d (
plain)
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
|
#![deny(clippy::all)]
#![deny(clippy::pedantic)]
#![allow(clippy::module_name_repetitions)]
mod animals;
mod bootstrap;
mod interfaces;
use bootstrap::bootstrap;
use interfaces::dog::IDog;
use interfaces::human::IHuman;
fn main()
{
println!("Hello, world!");
let di_container = bootstrap();
let dog = di_container.get_singleton::<dyn IDog>().unwrap();
dog.woof();
let human = di_container.get::<dyn IHuman>().unwrap();
human.make_pets_make_sounds();
}
|