diff options
Diffstat (limited to 'examples/unbound/interfaces')
-rw-r--r-- | examples/unbound/interfaces/animal_store.rs | 11 | ||||
-rw-r--r-- | examples/unbound/interfaces/mod.rs | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/examples/unbound/interfaces/animal_store.rs b/examples/unbound/interfaces/animal_store.rs new file mode 100644 index 0000000..dc8a4c3 --- /dev/null +++ b/examples/unbound/interfaces/animal_store.rs @@ -0,0 +1,11 @@ +use syrette::ptr::{SingletonPtr, TransientPtr}; + +use crate::interfaces::cat::ICat; +use crate::interfaces::dog::IDog; + +pub trait IAnimalStore +{ + fn get_dog(&self) -> SingletonPtr<dyn IDog>; + + fn get_cat(&self) -> &TransientPtr<dyn ICat>; +} diff --git a/examples/unbound/interfaces/mod.rs b/examples/unbound/interfaces/mod.rs index 5444978..bd9f848 100644 --- a/examples/unbound/interfaces/mod.rs +++ b/examples/unbound/interfaces/mod.rs @@ -1,3 +1,4 @@ +pub mod animal_store; pub mod cat; pub mod dog; pub mod human; |