aboutsummaryrefslogtreecommitdiff
path: root/src/errors
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-08-22 19:13:19 +0200
committerHampusM <hampus@hampusmat.com>2022-08-22 19:13:19 +0200
commit8e862c7998d0b59c71d20cbcbbc57031f734b6fa (patch)
treefbcddcfa697d0b67c9d20022004aa2ae16c5a339 /src/errors
parentda3f56d48f9c349b29e1d462b2a535b1a89c5e45 (diff)
refactor!: move specifying binding scope to a binding scope configurator
BREAKING CHANGE: Specifying the scope of a DI container binding is now done with a binding scope configurator
Diffstat (limited to 'src/errors')
-rw-r--r--src/errors/di_container.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/errors/di_container.rs b/src/errors/di_container.rs
index ed05a5e..98c2be4 100644
--- a/src/errors/di_container.rs
+++ b/src/errors/di_container.rs
@@ -54,7 +54,14 @@ pub enum BindingBuilderError
/// A binding already exists for a interface.
#[error("Binding already exists for interface '{0}'")]
BindingAlreadyExists(&'static str),
+}
+/// Error type for [`BindingScopeConfigurator`].
+///
+/// [`BindingBuilder`]: crate::di_container::BindingScopeConfigurator
+#[derive(thiserror::Error, Debug)]
+pub enum BindingScopeConfiguratorError
+{
/// Resolving a singleton failed.
#[error("Resolving the given singleton failed")]
SingletonResolveFailed(#[from] InjectableError),