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