Skip to main content

Crate hosting_di

Crate hosting_di 

Source
Expand description

Dependency injection container: register services in a ServiceCollection, build it into a ServiceProvider, then resolve.

Structs§

BuildError
The service collection was rejected by build.
Dependency
A service another service needs in order to be constructed.
Resolver
Resolves dependencies while a service is being constructed.
Scope
A unit of work with its own scoped instances, such as one request.
ServiceCollection
Services registered for an application, frozen into a ServiceProvider by build.
ServiceProvider
The root of a built container. Cheap to clone.

Enums§

BuildIssue
A single problem found while building a service collection.
Lifetime
How long a resolved instance is reused.
ResolveError
Why a service could not be resolved.

Traits§

CastFrom
Converts an implementation into the trait object it is registered as.
Service
A type the container can construct.

Type Aliases§

BoxError
Boxed error type accepted from constructors and factories.