-
-
Notifications
You must be signed in to change notification settings - Fork 80
Closed
Description
Usually, the state should be well-defined ahead of time, but currently apalis uses a HashMap<TypeId, State> (simplified).
Axum provides an option here to use the state extractor, once globally (actually per router).
So here users could have a struct instead, and this would be resolved compile-time.
Axum does have anymap but it's for extensions, and it would be rarer for such cases such that state is not known ahead of time, using https://docs.rs/http/latest/http/struct.Extensions.html.
Metadata
Metadata
Assignees
Labels
No labels