diff options
Diffstat (limited to 'examples/async/animals/cat.rs')
-rw-r--r-- | examples/async/animals/cat.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/examples/async/animals/cat.rs b/examples/async/animals/cat.rs new file mode 100644 index 0000000..b1e6f27 --- /dev/null +++ b/examples/async/animals/cat.rs @@ -0,0 +1,22 @@ +use syrette::injectable; + +use crate::interfaces::cat::ICat; + +pub struct Cat {} + +#[injectable(ICat, { async = true })] +impl Cat +{ + pub fn new() -> Self + { + Self {} + } +} + +impl ICat for Cat +{ + fn meow(&self) + { + println!("Meow!"); + } +} |