Expand description
Global state for the application.
§Global
vs. GlobalWithoutConfig
Global
has a set of functions that are called at different stages of the
application lifecycle. To use Global
, your application is expected to
have a config type implementing ConfigParser
. If your application does
not have a config, consider using the GlobalWithoutConfig
trait which is
a simplified version of Global
.
Traits§
- Global
- This trait is implemented for the global type of your application.
It is intended to be used to store any global state of your application.
When using the
main!
macro, one instance of this type will be made available to all services. - Global
Without Config - Simplified version of
Global
.