aboutsummaryrefslogtreecommitdiff
path: root/src/any_factory.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/any_factory.rs')
-rw-r--r--src/any_factory.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/any_factory.rs b/src/any_factory.rs
new file mode 100644
index 0000000..3aee98f
--- /dev/null
+++ b/src/any_factory.rs
@@ -0,0 +1,13 @@
+//! Interface for any factory to ever exist.
+
+use std::any::Any;
+use std::fmt::Debug;
+
+/// Interface for any factory to ever exist.
+pub trait AnyFactory: Any + Debug
+{
+ fn as_any(&self) -> &dyn Any;
+}
+
+/// Interface for any threadsafe factory to ever exist.
+pub trait AnyThreadsafeFactory: AnyFactory + Send + Sync + Debug {}