Inheritance

As explained in structures section, Rust does not provide (class-based) inheritance. A way to provide shared behavior between structs is via making use of traits. However, Rust allows to define relationships between traits by using supertraits.