Inheritance structs


As a new Rust programmer I started writing some small games, I quickly found out that it was very frustrating to not being able to inheritance structs (easily).

Is it planned to make it possible to inheritance structs?



There are currently mainly two competing proposals for adding inheritance to Rust:

RFC PR 142: Efficient single inheritance. RFC PR 223: Trait based inheritance.

Personally I lean towards the latter as it is more orthogonal and flexible, but both have their pros and cons.


Also please note this is not a support forum.

It is possible that your use case doesn’t actually require inheritance and can be written elegantly in idiomatic rust.

You may request a code review in the Rust subreddit, and there is a dedicated subreddit for game development in Rust. Welcome to the community. :slight_smile:


Thanks for the help.


Sorry I had not noticed that.