diff options
Diffstat (limited to 'src/interfaces')
| -rw-r--r-- | src/interfaces/any_factory.rs | 11 | ||||
| -rw-r--r-- | src/interfaces/async_injectable.rs | 2 | ||||
| -rw-r--r-- | src/interfaces/factory.rs | 23 | ||||
| -rw-r--r-- | src/interfaces/injectable.rs | 2 | ||||
| -rw-r--r-- | src/interfaces/mod.rs | 8 | 
5 files changed, 2 insertions, 44 deletions
diff --git a/src/interfaces/any_factory.rs b/src/interfaces/any_factory.rs deleted file mode 100644 index e47018b..0000000 --- a/src/interfaces/any_factory.rs +++ /dev/null @@ -1,11 +0,0 @@ -//! Interface for any factory to ever exist. - -use std::fmt::Debug; - -use crate::libs::intertrait::{CastFrom, CastFromSync}; - -/// Interface for any factory to ever exist. -pub trait AnyFactory: CastFrom + Debug {} - -/// Interface for any threadsafe factory to ever exist. -pub trait AnyThreadsafeFactory: CastFromSync + Debug {} diff --git a/src/interfaces/async_injectable.rs b/src/interfaces/async_injectable.rs index 4e614a3..e6a050e 100644 --- a/src/interfaces/async_injectable.rs +++ b/src/interfaces/async_injectable.rs @@ -6,7 +6,7 @@ use crate::dependency_history::IDependencyHistory;  use crate::di_container::asynchronous::IAsyncDIContainer;  use crate::errors::injectable::InjectableError;  use crate::future::BoxFuture; -use crate::libs::intertrait::CastFromSync; +use crate::private::cast::CastFromSync;  use crate::ptr::TransientPtr;  /// Interface for structs that can be injected into or be injected to. diff --git a/src/interfaces/factory.rs b/src/interfaces/factory.rs deleted file mode 100644 index c67abd6..0000000 --- a/src/interfaces/factory.rs +++ /dev/null @@ -1,23 +0,0 @@ -use std::marker::Tuple; - -use crate::libs::intertrait::CastFrom; -use crate::ptr::TransientPtr; - -/// Interface for a factory. -pub trait IFactory<Args, ReturnInterface>: -    Fn<Args, Output = TransientPtr<ReturnInterface>> + CastFrom -where -    Args: Tuple, -    ReturnInterface: 'static + ?Sized, -{ -} - -/// Interface for a threadsafe factory. -#[cfg(feature = "async")] -pub trait IThreadsafeFactory<Args, ReturnInterface>: -    Fn<Args, Output = TransientPtr<ReturnInterface>> + crate::libs::intertrait::CastFromSync -where -    Args: Tuple, -    ReturnInterface: 'static + ?Sized, -{ -} diff --git a/src/interfaces/injectable.rs b/src/interfaces/injectable.rs index 6130d2b..b70e13f 100644 --- a/src/interfaces/injectable.rs +++ b/src/interfaces/injectable.rs @@ -5,7 +5,7 @@ use std::rc::Rc;  use crate::dependency_history::IDependencyHistory;  use crate::di_container::blocking::IDIContainer;  use crate::errors::injectable::InjectableError; -use crate::libs::intertrait::CastFrom; +use crate::private::cast::CastFrom;  use crate::ptr::TransientPtr;  /// Interface for structs that can be injected into or be injected to. diff --git a/src/interfaces/mod.rs b/src/interfaces/mod.rs index 9815a11..e7068ad 100644 --- a/src/interfaces/mod.rs +++ b/src/interfaces/mod.rs @@ -2,14 +2,6 @@  pub mod injectable; -#[cfg(feature = "factory")] -#[doc(hidden)] -pub mod any_factory; - -#[cfg(feature = "factory")] -#[doc(hidden)] -pub mod factory; -  #[cfg(feature = "async")]  #[cfg_attr(doc_cfg, doc(cfg(feature = "async")))]  pub mod async_injectable;  | 
