Extractors #837
longfellowone
started this conversation in
Ideas
Extractors
#837
Replies: 1 comment
-
I think this is the default pattern these days and it makes a lot of sense. @sunli829 any idea if that would be hard to implement? |
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
-
Would it make sense to use the extractor pattern to pull .data() from &Context<'_>
Not sure if its even possible?
Similar to the way actix and axum work
https://docs.rs/axum/latest/axum/extract/index.html
https://actix.rs/docs/extractors/
Code example
Current method
With extractor (Instead of Data could be name anything, like
FromCtx<>
orCtx<>
Beta Was this translation helpful? Give feedback.
All reactions