Polymorphism with Rust, part 3: Trait objects 08 May 2025
This is the fourth post in a four part series on polymorphism with Rust. In this post I discuss how trait objects can be used to implement polymorphism in Rust.
This is the fourth post in a four part series on polymorphism with Rust. In this post I discuss how trait objects can be used to implement polymorphism in Rust.
This is the third post in a four part series on polymorphism with Rust. In this post I discuss how generics can be used to implement polymorphism in Rust.
This is the second post in a four part series on polymorphism with Rust. In this post I discuss how enums can be used to implement polymorphism in Rust.
This is the first post in a four part series on polymorphism with Rust. In this series, I discuss various methods for implementing polymorphism in Rust with a particular focus on inheritance like behaviour. I look at the advantages and disadvantages of each method, and discuss some more complicated use cases that can cause problems in certain situations.