Skip to main content

Module context

Module context 

Source
Expand description

The application context: configuration plus shared, typed state.

This is what replaces Laravel’s service container. Laravel resolves services by name at runtime; here a handler asks for a type and the compiler proves it was registered — req.state::<Database>() cannot typo its way into a runtime failure.

Structs§

Context
Shared state handed to every request, cheap to clone.
ContextBuilder