You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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