Blog

Polymorphism with Rust, part 3: Trait objects

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.

Polymorphism with Rust, part 2: Generics

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.

Polymorphism with Rust, part 1: Enums

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.

Polymorphism with Rust, part 0: Introduction

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.