diff options
author | HampusM <hampus@hampusmat.com> | 2022-08-29 20:52:56 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-08-29 21:01:32 +0200 |
commit | 080cc42bb1da09059dbc35049a7ded0649961e0c (patch) | |
tree | 307ee564124373616022c1ba2b4d5af80845cd92 /src/errors/injectable.rs | |
parent | 6e31d8f9e46fece348f329763b39b9c6f2741c07 (diff) |
feat: implement async functionality
Diffstat (limited to 'src/errors/injectable.rs')
-rw-r--r-- | src/errors/injectable.rs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/errors/injectable.rs b/src/errors/injectable.rs index 4b9af96..ed161cb 100644 --- a/src/errors/injectable.rs +++ b/src/errors/injectable.rs @@ -3,7 +3,7 @@ //! //! [`Injectable`]: crate::interfaces::injectable::Injectable -use super::di_container::DIContainerError; +use crate::errors::di_container::DIContainerError; /// Error type for structs that implement [`Injectable`]. /// @@ -23,6 +23,18 @@ pub enum InjectableError affected: &'static str, }, + /// Failed to resolve dependencies. + #[cfg(feature = "async")] + #[error("Failed to resolve a dependency of '{affected}'")] + AsyncResolveFailed + { + /// The reason for the problem. + #[source] + reason: Box<crate::errors::async_di_container::AsyncDIContainerError>, + + /// The affected injectable type. + affected: &'static str, + }, /// Detected circular dependencies. #[error("Detected circular dependencies. {dependency_trace}")] DetectedCircular |