this post was submitted on 30 Jun 2023
21 points (95.7% liked)
Rust
7280 readers
2 users here now
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Wormhole
Credits
- The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
The hardest part (for me) is dealing with the type requirements for the handlers. 99% of the time a simple await is enough, but when it isn't, I feel like I need to go spelunking.
Especially dealing with those pinned structs for the state. I get why it's needed because it's on the stack somewhere but it sure makes it hard to work with without using pin_project or pin_project_lite.
Yeah I hope that will improve over time (maybe with the necessary ergonomic changes for async traits and higher kinded types). But I feel this is just a matter of time and will likely be much better after the next Rust edition