diff options
author | HampusM <hampus@hampusmat.com> | 2022-10-29 14:38:51 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-10-29 14:40:11 +0200 |
commit | aa548ded39c7ba1927019c748c359523b21d59e8 (patch) | |
tree | 779d104f85009dd831e6af6e7a523258a1ab5be9 /src/errors | |
parent | da94fd3b7dd2265f10957d0f5276881beb057d82 (diff) |
refactor!: add dependency history type
BREAKING CHANGE: Binding builders & configurators now take dependency history type arguments, the DetectedCircular variant of InjectableError now contains a dependency history field & the injectable traits take dependency history instead of a Vec
Diffstat (limited to 'src/errors')
-rw-r--r-- | src/errors/injectable.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/errors/injectable.rs b/src/errors/injectable.rs index df71f48..f132063 100644 --- a/src/errors/injectable.rs +++ b/src/errors/injectable.rs @@ -2,6 +2,7 @@ //! //! [`Injectable`]: crate::interfaces::injectable::Injectable +use crate::dependency_history::DependencyHistory; use crate::errors::di_container::DIContainerError; /// Error type for structs that implement [`Injectable`]. @@ -35,10 +36,10 @@ pub enum InjectableError affected: &'static str, }, /// Detected circular dependencies. - #[error("Detected circular dependencies. {dependency_trace}")] + #[error("Detected circular dependencies. {dependency_history}")] DetectedCircular { - /// A visual trace of dependencies. - dependency_trace: String, + /// History of dependencies. + dependency_history: DependencyHistory, }, } |