I'm the author of the backblaze-b2 crate, and now that async await will be stabilized, I'm taking up work on it again.
Now, because I like being able to provide a nameable type, I tried to convert this state machine to the nightly async await ecosystem. I came up with this. I can't put it on the playground as it has the wrong versions of various dependencies.
Unfortunately this requires unsafe code to pin the futures stored in the various states of the enum. Are there any techniques to avoid this?
If there is any unsoundness in the linked code, I'd like to hear about it too.