diff options
Diffstat (limited to 'examples/unbound/main.rs')
-rw-r--r-- | examples/unbound/main.rs | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/examples/unbound/main.rs b/examples/unbound/main.rs deleted file mode 100644 index 29fa0d4..0000000 --- a/examples/unbound/main.rs +++ /dev/null @@ -1,32 +0,0 @@ -#![deny(clippy::all)] -#![deny(clippy::pedantic)] -#![allow(clippy::module_name_repetitions)] - -mod animal_store; -mod animals; -mod bootstrap; -mod interfaces; - -use anyhow::Result; -use syrette::di_container::blocking::prelude::*; - -use crate::bootstrap::bootstrap; -use crate::interfaces::dog::IDog; -use crate::interfaces::human::IHuman; - -fn main() -> Result<()> -{ - println!("Hello, world!"); - - let di_container = bootstrap()?; - - let dog = di_container.get::<dyn IDog>()?.singleton()?; - - dog.woof(); - - let human = di_container.get::<dyn IHuman>()?.transient()?; - - human.make_pets_make_sounds(); - - Ok(()) -} |