Trait dptree::di::DependencySupplier
source · [−]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:
- Do not implement
DependencySupplier
for the type. It often requires some type-level manipulations. - 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.