-
SummaryWhen I include axum_flash::Flash in my handler's parameters, the code works fine and I can both get and return the flash. However, when I add This prevents me from getting the true 'nice' errors debug_handler is supposed to generate. I can work around this by temporarily commenting out the parameter for Flash, but that means I need to make code-existence choices on the spot for debugging. Is there a marker like I am using axum-flash v0.17.1 directly from a git commit due to the currently published version not compatible with axum's current version. It does work fine. Only issue is the debug_handler problem. [dependencies]
axum-flash = { git = "https://github.com/davidpdrsn/axum-flash.git", rev = "0832703a0ca83b1ee35daaa8a199f68c2bcb4a90" }I have also seen #1354 and the docs it links. This would work, I think, if I only had the Flash, but I also have an AppState struct extracted with the State extractor, and I'm unsure how to use both states with debug_handler. Setting I am using the Thanks. axum version0.8.5 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
You can use |
Beta Was this translation helpful? Give feedback.
You can use
#[debug_handler(state = AppState)], as explained further down in the macro's docs.