Skip to content

Dependency injection? #3270

Answered by robjtede
DenuxPlays asked this question in Q&A
Jan 31, 2024 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

The FromRequest trait support async operations, see docs: https://docs.rs/actix-web/latest/actix_web/trait.FromRequest.html#associatedtype.Future

I'd suggest that creating an extractor (impl FromRequest) is the right way of achieving your goal here.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@robjtede
Comment options

Answer selected by DenuxPlays
@DenuxPlays
Comment options

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