Service Resolution
Services are resolved and injected using the functions provided by ServiceProvider
. A new scope is created during each
HTTP request before the handler is executed.
Extactor | Function |
---|---|
TryInject | get |
TryInjectMut | get_mut |
TryInjectWithKey | get_by_key |
InjectWithKeyMut | get_by_key_mut |
InjectAll | get_all |
InjectAllMut | get_all_mut |
InjectAllWithKey | get_all_by_key |
InjectWithKeyMut | get_all_by_key_mut |
Inject | get_required |
InjectMut | get_required_mut |
InjectWithKey | get_required_by_key |
InjectWithKeyMut | get_required_by_key_mut |
If resolution fails, the HTTP request will short-circuit with HTTP status code 500 - Internal Server Error.