Enum runtime_injector::InjectError[][src]

pub enum InjectError {
    MissingProvider {
        service_info: ServiceInfo,
    },
    MissingDependency {
        service_info: ServiceInfo,
        dependency_info: ServiceInfo,
    },
    CycleDetected {
        service_info: ServiceInfo,
        cycle: Vec<ServiceInfo>,
    },
    InvalidImplementation {
        service_info: ServiceInfo,
        implementation: ServiceInfo,
    },
    InvalidProvider {
        service_info: ServiceInfo,
    },
    InternalError(String),
}

An error that has occurred during creation of a service.

Variants

MissingProvider

Failed to find a provider for the requested type.

Fields of MissingProvider

service_info: ServiceInfo

The service that was requested.

MissingDependency

A provider for a dependency of the requested service is missing.

Fields of MissingDependency

service_info: ServiceInfo

The service that was requested.

dependency_info: ServiceInfo

The dependency that is missing a provider.

CycleDetected

A cycle was detected during activation of a service.

Fields of CycleDetected

service_info: ServiceInfo

The service that was requested.

cycle: Vec<ServiceInfo>

The chain of services that were requested during resolution of this service.

InvalidImplementation

The requested implementer is not valid for the requested service.

Fields of InvalidImplementation

service_info: ServiceInfo

The service that was requested.

implementation: ServiceInfo

The implementation that was requested for this service.

InvalidProvider

The registered provider returned the wrong service type.

Fields of InvalidProvider

service_info: ServiceInfo

The service that was requested.

InternalError(String)

An unexpected error has occurred. This is usually caused by a bug in the library itself.

Trait Implementations

impl Debug for InjectError[src]

impl Display for InjectError[src]

impl Error for InjectError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.