Earlier quoted context omitted.
Are you aware of generic associated types , which landed in 1.65 (late last year)? To a considerable extent, they’re Rust’s answer to higher-kinded types. Less expressive in some ways, but fitting Rust way better, as basically a relaxation of a former restriction, rather than a new feature. If I’m reading your snippet right, GATs let you express exactly that, though minus `template`’s duck-typiness so you’d have to s…
>less expressive in some ways, but fitting Rust way better, as basically a relaxation of a former restriction, rather than a new feature They're not expressive enough to implement a monadic async library, as far as I'm aware, so they don't fulfill the role of proper HKTs in this context. >minus `template`’s duck-typiness so you’d have to spell out what contract the container must adhere to. Do you think it's consiste…
For an example of GATs, you can see the following:
https://play.rust-lang.org/?version=stable&mode=debug&editio...