aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/factory.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/interfaces/factory.rs b/src/interfaces/factory.rs
index b09db36..de1fca9 100644
--- a/src/interfaces/factory.rs
+++ b/src/interfaces/factory.rs
@@ -9,3 +9,12 @@ where
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
+ ReturnInterface: 'static + ?Sized,
+{
+}