aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/factory.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-07-31 17:27:33 +0200
committerHampusM <hampus@hampusmat.com>2022-08-01 15:26:43 +0200
commit7a6575220c6d9db564514bcbee552faa29095738 (patch)
tree19a97692bde26f994892830f0ff6f8cc23f611e1 /src/interfaces/factory.rs
parente20e442ee84918f8f06794ebb1a389a3a04bcdcc (diff)
docs: add doc comments & deny missing docs
Diffstat (limited to 'src/interfaces/factory.rs')
-rw-r--r--src/interfaces/factory.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/interfaces/factory.rs b/src/interfaces/factory.rs
index 6f8e7c7..d3d55da 100644
--- a/src/interfaces/factory.rs
+++ b/src/interfaces/factory.rs
@@ -1,7 +1,18 @@
#![allow(clippy::module_name_repetitions)]
+
+//! Interface for a factory.
+
use crate::libs::intertrait::CastFrom;
use crate::ptr::TransientPtr;
+/// Interface for a factory.
+///
+/// # Examples
+/// ```
+/// use syrette::interface::factory::IFactory;
+///
+/// type StringFactory = dyn IFactory<(), String>;
+/// ```
pub trait IFactory<Args, ReturnInterface>:
Fn<Args, Output = TransientPtr<ReturnInterface>> + CastFrom
where