Replies: 1 comment
-
If the middleware is always setting the request extension and is wrapping everything (at the App level) then this should work. If you're still having issues and think there's a bug then please open an issue with a complete minimal reproduction. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi folks,
I have a trait - lets say
a struct like this:
and a struct that implements this trait -
Now, in some middleware I want to create struct User, set it in extensions like so:
So that I can read this in the handler and call the trait functions on it like so:
When I use the debugger I can see the type stored in extensions, but it is not being retrieved and my code panics when I unwrap(). What am I doing wrong here?
I'm sorry if this has been asked before, I didn't find anything on searching. Thank you for the library!
Beta Was this translation helpful? Give feedback.
All reactions