diff options
author | HampusM <hampus@hampusmat.com> | 2022-11-19 15:45:12 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-11-19 15:45:12 +0100 |
commit | 9f27a925bd323e8e0864bedeb33a3c6953517ea1 (patch) | |
tree | ea5d8faaed82c58fa037fa377173bb365e1cd697 /src/provider | |
parent | d99cbf9fa95856cbc14a3217e1cd3f13aeb2e0b3 (diff) |
refactor: reorganize non-public API items
Diffstat (limited to 'src/provider')
-rw-r--r-- | src/provider/async.rs | 12 | ||||
-rw-r--r-- | src/provider/blocking.rs | 12 |
2 files changed, 11 insertions, 13 deletions
diff --git a/src/provider/async.rs b/src/provider/async.rs index 557617b..da42c7b 100644 --- a/src/provider/async.rs +++ b/src/provider/async.rs @@ -24,19 +24,19 @@ where #[cfg(feature = "factory")] Factory( crate::ptr::ThreadsafeFactoryPtr< - dyn crate::interfaces::any_factory::AnyThreadsafeFactory, + dyn crate::private::any_factory::AnyThreadsafeFactory, >, ), #[cfg(feature = "factory")] DefaultFactory( crate::ptr::ThreadsafeFactoryPtr< - dyn crate::interfaces::any_factory::AnyThreadsafeFactory, + dyn crate::private::any_factory::AnyThreadsafeFactory, >, ), #[cfg(feature = "factory")] AsyncDefaultFactory( crate::ptr::ThreadsafeFactoryPtr< - dyn crate::interfaces::any_factory::AnyThreadsafeFactory, + dyn crate::private::any_factory::AnyThreadsafeFactory, >, ), } @@ -228,7 +228,7 @@ pub enum AsyncFactoryVariant pub struct AsyncFactoryProvider { factory: crate::ptr::ThreadsafeFactoryPtr< - dyn crate::interfaces::any_factory::AnyThreadsafeFactory, + dyn crate::private::any_factory::AnyThreadsafeFactory, >, variant: AsyncFactoryVariant, } @@ -238,7 +238,7 @@ impl AsyncFactoryProvider { pub fn new( factory: crate::ptr::ThreadsafeFactoryPtr< - dyn crate::interfaces::any_factory::AnyThreadsafeFactory, + dyn crate::private::any_factory::AnyThreadsafeFactory, >, variant: AsyncFactoryVariant, ) -> Self @@ -354,7 +354,7 @@ mod tests #[cfg(feature = "factory")] async fn async_factory_provider_works() -> Result<(), Box<dyn Error>> { - use crate::interfaces::any_factory::AnyThreadsafeFactory; + use crate::private::any_factory::AnyThreadsafeFactory; use crate::ptr::ThreadsafeFactoryPtr; #[derive(Debug)] diff --git a/src/provider/blocking.rs b/src/provider/blocking.rs index ebe0c37..ea506ab 100644 --- a/src/provider/blocking.rs +++ b/src/provider/blocking.rs @@ -16,11 +16,9 @@ where Transient(TransientPtr<dyn Injectable<DIContainerType, DependencyHistoryType>>), Singleton(SingletonPtr<dyn Injectable<DIContainerType, DependencyHistoryType>>), #[cfg(feature = "factory")] - Factory(crate::ptr::FactoryPtr<dyn crate::interfaces::any_factory::AnyFactory>), + Factory(crate::ptr::FactoryPtr<dyn crate::private::any_factory::AnyFactory>), #[cfg(feature = "factory")] - DefaultFactory( - crate::ptr::FactoryPtr<dyn crate::interfaces::any_factory::AnyFactory>, - ), + DefaultFactory(crate::ptr::FactoryPtr<dyn crate::private::any_factory::AnyFactory>), } #[cfg_attr(test, mockall::automock, allow(dead_code))] @@ -135,7 +133,7 @@ where #[cfg(feature = "factory")] pub struct FactoryProvider { - factory: crate::ptr::FactoryPtr<dyn crate::interfaces::any_factory::AnyFactory>, + factory: crate::ptr::FactoryPtr<dyn crate::private::any_factory::AnyFactory>, is_default_factory: bool, } @@ -143,7 +141,7 @@ pub struct FactoryProvider impl FactoryProvider { pub fn new( - factory: crate::ptr::FactoryPtr<dyn crate::interfaces::any_factory::AnyFactory>, + factory: crate::ptr::FactoryPtr<dyn crate::private::any_factory::AnyFactory>, is_default_factory: bool, ) -> Self { @@ -239,7 +237,7 @@ mod tests #[cfg(feature = "factory")] fn factory_provider_works() -> Result<(), Box<dyn Error>> { - use crate::interfaces::any_factory::AnyFactory; + use crate::private::any_factory::AnyFactory; use crate::ptr::FactoryPtr; #[derive(Debug)] |