aboutsummaryrefslogtreecommitdiff
path: root/src/private/factory.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2023-09-17 13:08:23 +0200
committerHampusM <hampus@hampusmat.com>2023-09-17 13:08:23 +0200
commit3e3a853615e97ee7c3aef09736eae8170c6fd78e (patch)
treedec1ed4cb85868ea2931f072150e3cd9b0ab32aa /src/private/factory.rs
parent75ca777bbeb618e14b1cf8854ebb37b7a2c884b5 (diff)
refactor: replace castable factory Fn impl with method
Diffstat (limited to 'src/private/factory.rs')
-rw-r--r--src/private/factory.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/private/factory.rs b/src/private/factory.rs
index af6df8a..23b4e8f 100644
--- a/src/private/factory.rs
+++ b/src/private/factory.rs
@@ -4,11 +4,11 @@ use crate::private::cast::CastFrom;
use crate::ptr::TransientPtr;
/// Interface for a factory.
-pub trait IFactory<ReturnInterface, DIContainerT>:
- Fn<(Rc<DIContainerT>,), Output = TransientPtr<ReturnInterface>> + CastFrom
+pub trait IFactory<ReturnInterface, DIContainerT>: CastFrom
where
ReturnInterface: 'static + ?Sized,
{
+ fn call(&self, di_container: Rc<DIContainerT>) -> TransientPtr<ReturnInterface>;
}
/// Interface for a threadsafe factory.