aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--macros/src/lib.rs2
-rw-r--r--src/di_container.rs4
-rw-r--r--src/interfaces/factory.rs5
3 files changed, 10 insertions, 1 deletions
diff --git a/macros/src/lib.rs b/macros/src/lib.rs
index 86db787..9b97be6 100644
--- a/macros/src/lib.rs
+++ b/macros/src/lib.rs
@@ -90,6 +90,8 @@ pub fn injectable(args_stream: TokenStream, impl_stream: TokenStream) -> TokenSt
/// Makes a type alias usable as a factory interface.
///
+/// *This macro is only available if Syrette is built with the "factory" feature.*
+///
/// # Panics
/// If the attributed item is not a type alias.
///
diff --git a/src/di_container.rs b/src/di_container.rs
index 89bbcd1..9509bd8 100644
--- a/src/di_container.rs
+++ b/src/di_container.rs
@@ -126,6 +126,8 @@ where
/// Creates a binding of factory type `Interface` to a factory inside of the
/// associated [`DIContainer`].
+ ///
+ /// *This function is only available if Syrette is built with the "factory" feature.*
#[cfg(feature = "factory")]
pub fn to_factory<Args, Return>(
&mut self,
@@ -228,6 +230,8 @@ impl DIContainer
/// Returns the factory bound with factory type `Interface`.
///
+ /// *This function is only available if Syrette is built with the "factory" feature.*
+ ///
/// # Errors
/// Will return `Err` if:
/// - No binding for `Interface` exists
diff --git a/src/interfaces/factory.rs b/src/interfaces/factory.rs
index d3d55da..29b9f08 100644
--- a/src/interfaces/factory.rs
+++ b/src/interfaces/factory.rs
@@ -1,7 +1,10 @@
#![allow(clippy::module_name_repetitions)]
//! Interface for a factory.
-
+//!
+//! ---
+//!
+//! *This module is only available if Syrette is built with the "factory" feature.*
use crate::libs::intertrait::CastFrom;
use crate::ptr::TransientPtr;