aboutsummaryrefslogtreecommitdiff
path: root/examples/named/main.rs
blob: e7cccd094af8929029741b0b2676a4ab462bf135 (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 bootstrap;
mod interfaces;
mod katana;
mod ninja;
mod shuriken;

use anyhow::Result;
use syrette::di_container::blocking::prelude::*;

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

fn main() -> Result<()>
{
    let di_container = bootstrap()?;

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

    ninja.use_weapons();

    Ok(())
}