aboutsummaryrefslogtreecommitdiff
path: root/examples/named/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/named/main.rs')
-rw-r--r--examples/named/main.rs25
1 files changed, 25 insertions, 0 deletions
diff --git a/examples/named/main.rs b/examples/named/main.rs
new file mode 100644
index 0000000..5411a12
--- /dev/null
+++ b/examples/named/main.rs
@@ -0,0 +1,25 @@
+#![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 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(())
+}