#[non_exhaustive]pub enum KernelError {
Show 14 variants
MissingProvider {
module: &'static str,
requested: String,
required_by: String,
},
NotExported {
module: &'static str,
requested: String,
owner: &'static str,
},
NotImported {
module: &'static str,
requested: String,
owner: &'static str,
},
AmbiguousProvider {
module: &'static str,
requested: String,
owners: Vec<&'static str>,
},
ProviderCycle {
path: Vec<String>,
},
ModuleCycle {
path: Vec<&'static str>,
},
ScopeInversion {
module: &'static str,
singleton: String,
request_scoped: String,
},
MissingRequestScope {
provider: String,
},
ConfiguredTwice {
module: &'static str,
},
DuplicateProvider {
module: &'static str,
key: String,
},
Construction {
provider: String,
source: BoxError,
},
UnknownCommand {
name: String,
},
DuplicateCommand {
name: String,
first: &'static str,
second: &'static str,
},
Lifecycle {
module: &'static str,
hook: &'static str,
source: BoxError,
},
}Expand description
An error raised while validating the module graph, resolving a provider, running a lifecycle hook or dispatching a command.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
MissingProvider
No provider for requested is visible from module.
Fields
NotExported
The provider exists in an imported module but that module does not export it.
Fields
NotImported
The provider is exported by a module that the requesting module does not import.
Fields
AmbiguousProvider
Several different providers of the key are visible (e.g. two imports export it).
Fields
ProviderCycle
A provider dependency cycle (A -> B -> A).
ModuleCycle
A module import cycle (AModule -> BModule -> AModule).
ScopeInversion
A singleton depends (directly or through transients) on a request-scoped provider.
Fields
MissingRequestScope
A request-scoped provider was resolved without a RequestScope.
ConfiguredTwice
Two configured (for_root) instances of the same module.
DuplicateProvider
The same provider key registered twice in one module.
Construction
A provider factory or constructor failed.
UnknownCommand
No command with this name is registered.
DuplicateCommand
Two modules register a command with the same name.
Fields
Lifecycle
A lifecycle hook failed.
Trait Implementations§
Source§impl Debug for KernelError
impl Debug for KernelError
Source§impl Display for KernelError
impl Display for KernelError
Source§impl Error for KernelError
impl Error for KernelError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()