New Rustacean e025: Traits Deep Dive, Part III—Closure traits, impl trait, dyn trait, and object safety!


#1

At last, the conclusion of this epic (or at least epically-difficult-to-finish-writing) deep dive on Rust’s trait system! Closure traits, impl trait, dyn trait, and object safety!

Listen:

Direct downloads:


#2

Thanks, that’s exactly what I’m dealing with here - https://stackoverflow.com/questions/51208951/how-to-introduce-trait-indirection-with-futures

If I want to use different implementations of a trait, the compiler wouldn’t know the size of the returned value and thus it would not be able to place it on the stack. I guess I must say bye bye to my C# habits.