Skip to main content

NidusError

Enum NidusError 

Source
pub enum NidusError {
Show 18 variants MissingProvider { type_name: &'static str, }, DuplicateProvider { type_name: &'static str, }, RequestScopeRequired { type_name: &'static str, }, CircularProviderResolution { type_name: &'static str, }, DuplicateModule { module: String, }, DuplicateModuleProvider { module: String, provider: String, }, DuplicateModuleController { module: String, controller: String, }, ModuleProviderControllerConflict { module: String, type_name: String, }, DuplicateModuleImport { module: String, import: String, }, DuplicateModuleExport { module: String, provider: String, }, ProviderFactory { type_name: &'static str, source: Box<NidusError>, }, MissingModuleImport { module: String, import: String, }, CircularModuleImport { cycle: Vec<String>, }, MissingProviderExport { module: String, provider: String, }, ProviderVisibilityConflict { module: String, provider: String, import: String, }, AmbiguousProvider { module: String, provider: String, imports: Vec<String>, }, LifecycleStartup { source: Box<NidusError>, rollback_errors: Vec<NidusError>, }, ApplicationBuild { message: String, },
}
Expand description

Errors emitted by Nidus core primitives.

Variants§

§

MissingProvider

A dependency was requested but no provider exists for its concrete type.

Fields

§type_name: &'static str

Rust type name requested from the container.

§

DuplicateProvider

A provider was registered more than once for the same concrete type.

Fields

§type_name: &'static str

Rust type name registered more than once.

§

RequestScopeRequired

A request-scoped provider was resolved outside an explicit request scope.

Fields

§type_name: &'static str

Rust type name requested from the root container.

§

CircularProviderResolution

A provider factory recursively requested a provider already being built.

Fields

§type_name: &'static str

Rust type name that was requested recursively.

§

DuplicateModule

A module was registered more than once with the same name.

Fields

§module: String

Module name registered more than once.

§

DuplicateModuleProvider

A module declares the same provider more than once.

Fields

§module: String

Module declaring the duplicate provider.

§provider: String

Provider name declared more than once.

§

DuplicateModuleController

A module declares the same controller more than once.

Fields

§module: String

Module declaring the duplicate controller.

§controller: String

Controller name declared more than once.

§

ModuleProviderControllerConflict

A module declares the same type name as both a provider and a controller.

Fields

§module: String

Module declaring the conflicting metadata.

§type_name: String

Type name declared in both metadata sections.

§

DuplicateModuleImport

A module imports the same module more than once.

Fields

§module: String

Module declaring the duplicate import.

§import: String

Imported module named more than once.

§

DuplicateModuleExport

A module exports the same provider more than once.

Fields

§module: String

Module declaring the duplicate export.

§provider: String

Provider export named more than once.

§

ProviderFactory

A registered provider factory returned an error.

Fields

§type_name: &'static str

Rust type name whose factory failed.

§source: Box<NidusError>

Underlying framework error.

§

MissingModuleImport

A module imports another module that is not present in the graph.

Fields

§module: String

Module declaring the import.

§import: String

Missing imported module.

§

CircularModuleImport

A circular module import chain was detected.

Fields

§cycle: Vec<String>

Ordered cycle path.

§

MissingProviderExport

A module exports a provider it does not own.

Fields

§module: String

Module declaring the export.

§provider: String

Provider missing from the module’s provider list.

§

ProviderVisibilityConflict

A module declares a local provider that is also exported by one of its imports.

Fields

§module: String

Module with the conflicting provider visibility.

§provider: String

Provider name declared locally and exported by an import.

§import: String

Imported module exporting the same provider name.

§

AmbiguousProvider

A module can see multiple providers with the same name through imports.

Fields

§module: String

Module with ambiguous visibility.

§provider: String

Provider name that is visible from more than one import.

§imports: Vec<String>

Imports exporting the same provider.

§

LifecycleStartup

A lifecycle startup hook failed after one or more hooks may have started.

Fields

§source: Box<NidusError>

Original startup failure.

§rollback_errors: Vec<NidusError>

Shutdown failures encountered while rolling back already-started hooks.

§

ApplicationBuild

Application composition failed during high-level bootstrap.

Fields

§message: String

Human-readable build failure.

Trait Implementations§

Source§

impl Debug for NidusError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for NidusError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for NidusError

Source§

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

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Provider for T
where T: Send + Sync + 'static,

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more