aboutsummaryrefslogtreecommitdiff
path: root/examples/async/food.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/async/food.rs')
-rw-r--r--examples/async/food.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/examples/async/food.rs b/examples/async/food.rs
new file mode 100644
index 0000000..c2264cf
--- /dev/null
+++ b/examples/async/food.rs
@@ -0,0 +1,19 @@
+use crate::interfaces::food::IFood;
+
+pub struct Food {}
+
+impl Food
+{
+ pub fn new() -> Self
+ {
+ Self {}
+ }
+}
+
+impl IFood for Food
+{
+ fn eat(&self)
+ {
+ println!("Ate food");
+ }
+}