aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-07-22 13:25:45 +0200
committerHampusM <hampus@hampusmat.com>2022-07-22 13:25:45 +0200
commit4cb3884e24b3cba3347ff93475bbabd6fe18d2fa (patch)
tree2fa5e6d81de9dc39bd11d64797914e5d305d98e2 /src/interfaces
parent157f38bc2287dcb9a8b21ef3d5e33c569dc5136e (diff)
refactor: make factories an optional feature
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/any_factory.rs3
-rw-r--r--src/interfaces/mod.rs5
2 files changed, 7 insertions, 1 deletions
diff --git a/src/interfaces/any_factory.rs b/src/interfaces/any_factory.rs
new file mode 100644
index 0000000..41063e1
--- /dev/null
+++ b/src/interfaces/any_factory.rs
@@ -0,0 +1,3 @@
+use crate::libs::intertrait::CastFrom;
+
+pub trait AnyFactory: CastFrom {}
diff --git a/src/interfaces/mod.rs b/src/interfaces/mod.rs
index 921bb9c..497521e 100644
--- a/src/interfaces/mod.rs
+++ b/src/interfaces/mod.rs
@@ -1,2 +1,5 @@
-pub mod factory;
+pub mod any_factory;
pub mod injectable;
+
+#[cfg(feature = "factory")]
+pub mod factory;