Review of rust-related blog post: HRTB + impl/opaque type

Hello! I hope it's okay to use "code review" for reviewing a blog post. There's quite a bit of sample code in the post. I have written a two-part blog series explaining how I solved a real-world problem involving a generic async dispatcher (calling async methods from a sync API exposed via FFI on an instance of the struct) and implementing a generic async RwLock trait that forced me to grapple with some limitations on opaque/impl types. These both came from porting some go code to rust. The blog presents some go code and goes through steps of porting it to rust and solving some problems and explaining some concepts along the way.

The first post presents a solution using a subtrait of one of the Fn traits and uses a lifetime on the trait to tie lifetimes of the Future with the arguments and provides what I think is a clearer explanation of HRTB than I was able to find while trying to understand it. The second one shows a possibly unconventional workaround for not being able to do something like Box<impl AsyncRwLock> for a case where using dynamic trait objects would be cumbersome. I've attempted to acknowledge solutions like async_trait, boxed futures, and conditional compilation while still presenting my solution for its learning value.

If anyone has time/inclination, I'd welcome feedback before I publish. Are my explanations clear? Have I overlooked something obvious? Am I leading people astray? The point of the blog is more about gaining insight than it is about my specific solutions, but I don't want to present solutions that have some deep flaw I haven't thought of.

I probably won't publish this until January as I think publishing a tech-heavy blog a few days before winter holidays may not be so great for my readership. :slight_smile:

Below are "draft links" which require you to have a medium account.