pub trait DependencySupplier<Value> {
    fn get(&self) -> Arc<Value>;
}
Expand description

A DI container from which we can extract a value of a given type.

There are two possible ways to handle the situation when your container cannot return a value of specified type:

  1. Do not implement DependencySupplier for the type. It often requires some type-level manipulations.
  2. Runtime panic. Be careful in this case: check whether you add your type to the container.

A concrete solution is left to a particular implementation.

Required Methods

Get the value.

We assume that all values are stored in Arc<_>.

Implementations on Foreign Types

Implementors