pub trait DIProvider {
    type Output: ?Sized;

    // Required method
    fn di_on(container: &DIContainer) -> DI<Self::Output>;

    // Provided method
    fn di() -> DI<Self::Output> { ... }
}
Expand description

Provides component instance for trait DI types.

Required Associated Types§

source

type Output: ?Sized

Target trait type.

Required Methods§

source

fn di_on(container: &DIContainer) -> DI<Self::Output>

DI on a container.

Provided Methods§

source

fn di() -> DI<Self::Output>

DI on the global container.

Object Safety§

This trait is not object safe.

Implementors§