aboutsummaryrefslogtreecommitdiff
path: root/examples/named/interfaces
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-08-27 23:41:41 +0200
committerHampusM <hampus@hampusmat.com>2022-08-27 23:41:41 +0200
commite0f90a8e384615c79d7d51c66d19294d75e79391 (patch)
treef3df3d1cd92f7d4a978feaa5a9a5f773dd0901ee /examples/named/interfaces
parentd4078c84a83d121a4e3492955359cedb3b404476 (diff)
feat: implement named bindings
Diffstat (limited to 'examples/named/interfaces')
-rw-r--r--examples/named/interfaces/mod.rs2
-rw-r--r--examples/named/interfaces/ninja.rs4
-rw-r--r--examples/named/interfaces/weapon.rs4
3 files changed, 10 insertions, 0 deletions
diff --git a/examples/named/interfaces/mod.rs b/examples/named/interfaces/mod.rs
new file mode 100644
index 0000000..6a0108d
--- /dev/null
+++ b/examples/named/interfaces/mod.rs
@@ -0,0 +1,2 @@
+pub mod ninja;
+pub mod weapon;
diff --git a/examples/named/interfaces/ninja.rs b/examples/named/interfaces/ninja.rs
new file mode 100644
index 0000000..2d378c8
--- /dev/null
+++ b/examples/named/interfaces/ninja.rs
@@ -0,0 +1,4 @@
+pub trait INinja
+{
+ fn use_weapons(&self);
+}
diff --git a/examples/named/interfaces/weapon.rs b/examples/named/interfaces/weapon.rs
new file mode 100644
index 0000000..7848a0f
--- /dev/null
+++ b/examples/named/interfaces/weapon.rs
@@ -0,0 +1,4 @@
+pub trait IWeapon
+{
+ fn use_it(&self);
+}