Skip to content

Latest commit

 

History

History
8 lines (4 loc) · 628 Bytes

readme.md

File metadata and controls

8 lines (4 loc) · 628 Bytes

Type Plugs - A Method for emulating Higher-Kinded Types in Rust

This is a small demonstration of a technique for emulating Higher-Kinded Types (HKTs)/Generalised Associated Types(GATs) through existing language features. Basically, you can emulate T::F<X> as being <T::F as Plug<X>>::result_t with the Plug trait, and you can destructure F<X> down to F<_>, A through the Unplug trait.

You can read more about how this works with the original post and the followup.