From 8aeb7ad439b67228a0abc46b259967e8c91f8a97 Mon Sep 17 00:00:00 2001 From: HampusM Date: Thu, 17 Aug 2023 22:04:17 +0200 Subject: docs: remove the 'unbound' example This was not at all a useful example --- examples/unbound/animal_store.rs | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 examples/unbound/animal_store.rs (limited to 'examples/unbound/animal_store.rs') diff --git a/examples/unbound/animal_store.rs b/examples/unbound/animal_store.rs deleted file mode 100644 index b2127e4..0000000 --- a/examples/unbound/animal_store.rs +++ /dev/null @@ -1,34 +0,0 @@ -use syrette::injectable; -use syrette::ptr::{SingletonPtr, TransientPtr}; - -use crate::interfaces::animal_store::IAnimalStore; -use crate::interfaces::cat::ICat; -use crate::interfaces::dog::IDog; - -pub struct AnimalStore -{ - dog: SingletonPtr, - cat: TransientPtr, -} - -#[injectable] -impl AnimalStore -{ - fn new(dog: SingletonPtr, cat: TransientPtr) -> Self - { - Self { dog, cat } - } -} - -impl IAnimalStore for AnimalStore -{ - fn get_dog(&self) -> SingletonPtr - { - self.dog.clone() - } - - fn get_cat(&self) -> &TransientPtr - { - &self.cat - } -} -- cgit v1.2.3-18-g5258