pub fn inject<T: 'static>() -> Rc<T>Expand description
Injects a service from the global DI container.
This hook retrieves a shared reference (Rc) to a service that was
previously provided via provide_service.
ยงPanics
This function will panic if the requested service (T) has not been
provided, or if the stored service cannot be downcast to the requested type.