aboutsummaryrefslogtreecommitdiff
path: root/examples/named/katana.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/named/katana.rs')
-rw-r--r--examples/named/katana.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/examples/named/katana.rs b/examples/named/katana.rs
new file mode 100644
index 0000000..a03af6d
--- /dev/null
+++ b/examples/named/katana.rs
@@ -0,0 +1,22 @@
+use syrette::injectable;
+
+use crate::interfaces::weapon::IWeapon;
+
+pub struct Katana {}
+
+#[injectable(IWeapon)]
+impl Katana
+{
+ pub fn new() -> Self
+ {
+ Self {}
+ }
+}
+
+impl IWeapon for Katana
+{
+ fn use_it(&self)
+ {
+ println!("Used katana!");
+ }
+}