Comments| lobste.rs
This post originated from an interesting conversation had on the Rust community Discord the other day, in which a user asks:| Sabrina Jewson
It is thankfully common wisdom nowadays that documentation must be placed as near as possible to the code it documents, and should be fine-grained to a minimal unit of describability (the thing being documented). The practice provides numerous benefits to the codebase and project as a whole:| Sabrina Jewson
Update (2022-05-30): danielhenrymantilla recently released a crate, nougat, which provides a proc macro that allows you to use the technique presented in this article with the same syntax as regular GATs. I encourage you to check it out!| Sabrina Jewson
Since I’ve spent the past few days working on creating this website, I thought I’d make good use of the effort by documenting my experiences here.| Sabrina Jewson
The main focus of this article will be on attempting to design a system to support asynchronous destructors in the Rust programming language, figuring the exact semantics of them and resolving any issues encountered along the way. By side effect, it also designs a language feature called “async genericity” which enables supporting blocking and asynchronous code with the same codebase, as well as designing a system for completion-guaranteed futures to be added to the language.| Sabrina Jewson