Skip to content

How do you pass shared state into manual handler functions? #3418

Answered by robjtede
alshdavid asked this question in Q&A
Discussion options

You must be logged in to vote

State is not passed to handlers like that. You can read about how to set up shared mutable state in the guide: https://actix.rs/docs/application#shared-mutable-state

Also see the docs for App::app_data() and the links through to Data<T>'s docs.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by robjtede
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants