aboutsummaryrefslogtreecommitdiff
path: root/src/castable_factory/threadsafe.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/castable_factory/threadsafe.rs')
-rw-r--r--src/castable_factory/threadsafe.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/castable_factory/threadsafe.rs b/src/castable_factory/threadsafe.rs
index 5935d75..8b1e66d 100644
--- a/src/castable_factory/threadsafe.rs
+++ b/src/castable_factory/threadsafe.rs
@@ -1,9 +1,12 @@
use std::any::{type_name, Any};
use std::fmt::Debug;
-use crate::any_factory::{AnyFactory, AnyThreadsafeFactory};
+use crate::castable_factory::AnyCastableFactory;
use crate::ptr::TransientPtr;
+/// Interface for any threadsafe castable factory.
+pub trait AnyThreadsafeCastableFactory: AnyCastableFactory + Send + Sync + Debug {}
+
pub struct ThreadsafeCastableFactory<ReturnInterface, DIContainerT>
where
DIContainerT: 'static,
@@ -33,7 +36,7 @@ where
}
}
-impl<ReturnInterface, DIContainerT> AnyFactory
+impl<ReturnInterface, DIContainerT> AnyCastableFactory
for ThreadsafeCastableFactory<ReturnInterface, DIContainerT>
where
DIContainerT: 'static,
@@ -45,7 +48,7 @@ where
}
}
-impl<ReturnInterface, DIContainerT> AnyThreadsafeFactory
+impl<ReturnInterface, DIContainerT> AnyThreadsafeCastableFactory
for ThreadsafeCastableFactory<ReturnInterface, DIContainerT>
where
DIContainerT: 'static,