aboutsummaryrefslogtreecommitdiff
path: root/examples/with-3rd-party/main.rs
blob: e9f8c895514dbb882e63ca1284722502223ce799 (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
#![deny(clippy::all)]
#![deny(clippy::pedantic)]
#![allow(clippy::module_name_repetitions)]

mod bootstrap;
mod interfaces;
mod ninja;

use std::error::Error;

use crate::bootstrap::bootstrap;
use crate::interfaces::ninja::INinja;

fn main() -> Result<(), Box<dyn Error>>
{
    println!("Hello, world!");

    let di_container = bootstrap()?;

    let ninja = di_container.get::<dyn INinja>()?.transient()?;

    ninja.throw_shuriken();

    Ok(())
}