From 9ab2f550a25c3e4465afa025e4ffb1294b331bdb Mon Sep 17 00:00:00 2001 From: HampusM Date: Tue, 19 Jul 2022 13:11:19 +0200 Subject: docs: split example into multiple files --- example/src/animals/dog.rs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 example/src/animals/dog.rs (limited to 'example/src/animals/dog.rs') diff --git a/example/src/animals/dog.rs b/example/src/animals/dog.rs new file mode 100644 index 0000000..84959c0 --- /dev/null +++ b/example/src/animals/dog.rs @@ -0,0 +1,22 @@ +use syrette::injectable; + +use crate::interfaces::dog::IDog; + +pub struct Dog {} + +#[injectable(IDog)] +impl Dog +{ + pub fn new() -> Self + { + Self {} + } +} + +impl IDog for Dog +{ + fn woof(&self) + { + println!("Woof!"); + } +} -- cgit v1.2.3-18-g5258