diff options
author | HampusM <hampus@hampusmat.com> | 2022-08-01 18:14:12 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-08-01 18:14:12 +0200 |
commit | 980bedd54ee4f0d0da3902fc22cfaebdfd3ff1b8 (patch) | |
tree | b09f42e9928d6b41507d924307b7ecd8ffbeb6a8 /src | |
parent | eeef21b0b78aa7970e0ab93f37b3b6bba5391426 (diff) |
docs: add factory feature notices
Diffstat (limited to 'src')
-rw-r--r-- | src/di_container.rs | 4 | ||||
-rw-r--r-- | src/interfaces/factory.rs | 5 |
2 files changed, 8 insertions, 1 deletions
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; |