#[non_exhaustive]pub enum ResolveError {
NotRegistered {
path: Vec<&'static str>,
},
ScopedFromRoot {
path: Vec<&'static str>,
},
Cycle {
path: Vec<&'static str>,
},
Construction {
path: Vec<&'static str>,
source: BoxError,
},
}Expand description
Why a service could not be resolved.
Every variant carries the dependency path: type names from the service that was requested down to the one the error is about.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NotRegistered
The last service in path has no registration.
ScopedFromRoot
The last service in path is scoped but was requested outside a scope,
either from the root provider or by a singleton.
Cycle
The services in path depend on each other; the first and last entries
are the same service.
Construction
The constructor of the last service in path returned an error.
Implementations§
Trait Implementations§
Source§impl Debug for ResolveError
impl Debug for ResolveError
Source§impl Display for ResolveError
impl Display for ResolveError
Source§impl Error for ResolveError
impl Error for ResolveError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for ResolveError
impl !UnwindSafe for ResolveError
impl Freeze for ResolveError
impl Send for ResolveError
impl Sync for ResolveError
impl Unpin for ResolveError
impl UnsafeUnpin for ResolveError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more