diff options
author | HampusM <hampus@hampusmat.com> | 2023-08-20 17:01:12 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2023-08-20 17:01:12 +0200 |
commit | 0b4232d343e2214ead8fa62583bff2e948173ddf (patch) | |
tree | f809051c9933a132971ab91244e83d1f9d387ad6 /src/test_utils.rs | |
parent | be2c39b452b8b1e024300caff1ce8f11d54b27ce (diff) |
feat: expose DI container get_bound methods to public API
Diffstat (limited to 'src/test_utils.rs')
-rw-r--r-- | src/test_utils.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/test_utils.rs b/src/test_utils.rs index 1fe4417..1e0e04d 100644 --- a/src/test_utils.rs +++ b/src/test_utils.rs @@ -288,7 +288,7 @@ pub mod mocks use super::*; use crate::di_container::blocking::binding::builder::BindingBuilder; use crate::di_container::blocking::details::DIContainerInternals; - use crate::di_container::blocking::IDIContainer; + use crate::di_container::blocking::{BindingOptionsWithLt, IDIContainer}; use crate::errors::di_container::DIContainerError; use crate::provider::blocking::IProvider; use crate::ptr::SomePtr; @@ -317,10 +317,10 @@ pub mod mocks Interface: 'static + ?Sized; #[doc(hidden)] - fn get_bound<Interface>( + fn get_bound<'opts, Interface>( self: &Rc<Self>, dependency_history: DependencyHistory, - name: Option<&'static str>, + binding_options: BindingOptionsWithLt, ) -> Result<SomePtr<Interface>, DIContainerError> where Interface: 'static + ?Sized; @@ -359,6 +359,7 @@ pub mod mocks use crate::di_container::asynchronous::binding::builder::AsyncBindingBuilder; use crate::di_container::asynchronous::details::DIContainerInternals; use crate::di_container::asynchronous::IAsyncDIContainer; + use crate::di_container::BindingOptions; use crate::errors::async_di_container::AsyncDIContainerError; use crate::provider::r#async::IAsyncProvider; use crate::ptr::SomePtr; @@ -394,7 +395,7 @@ pub mod mocks async fn get_bound<Interface>( self: &Arc<Self>, dependency_history: DependencyHistory, - name: Option<&'static str>, + binding_options: BindingOptions<'static> ) -> Result<SomePtr<Interface>, AsyncDIContainerError> where Interface: 'static + ?Sized + Send + Sync; |