diff options
author | HampusM <hampus@hampusmat.com> | 2022-09-17 18:37:30 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-09-17 18:37:30 +0200 |
commit | e210a95b9724bf9c471090d629c5962e3e411711 (patch) | |
tree | 3a064e34ad1dd61bcd25fbd5fda72ddacd847f53 /examples/async/food.rs | |
parent | 7de7f73963a266cceff85d6ab71c3256e5d382ec (diff) |
docs: add missing modules in the async example
Diffstat (limited to 'examples/async/food.rs')
-rw-r--r-- | examples/async/food.rs | 19 |
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"); + } +} |