From 8c66b98bca6ed0a2990903fe8e0ea72def5c7be8 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 21 Aug 2022 14:19:07 +0200 Subject: refactor!: change errors to be more sane BREAKING CHANGE: Major improvements have been made to error types and the error_stack crate is no longer used --- examples/unbound/interfaces/animal_store.rs | 11 +++++++++++ examples/unbound/interfaces/mod.rs | 1 + 2 files changed, 12 insertions(+) create mode 100644 examples/unbound/interfaces/animal_store.rs (limited to 'examples/unbound/interfaces') 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; + + fn get_cat(&self) -> &TransientPtr; +} 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; -- cgit v1.2.3-18-g5258