Skip to main content

provide_service

Function provide_service 

Source
pub fn provide_service<T: 'static>(service: T)
Expand description

Provides a service to the application’s global DI container.

The service is stored by its type, so only one instance of any given type can be provided.