I had an issue today related to sql transactions + async code, and I got here after some google searching. The private Drop idea seems like a really cool idea. For the context of async code this feature could be very useful, because at this point we have no way of having an async Drop.
My use case is an sqlite transaction that I manage over an async channel. I want to make sure that I can not leave the scope without closing the transaction, and it will be great to have it checked by the compiler. Currently my best solution is to call a closure with a &mut ref to the channel, having the external caller function call "begin transaction" and "end transaction" asynchronously.
But this is Rust, I don't want a practical compromise!
Almost two years have passed. I was wondering if there is any progress with this idea. I care mostly about solutions that work during compile time.