Hacker News new | ask | show | jobs
by ww520 3400 days ago
Rust has flat level class: Struct and its implementation methods. No inheritance here. Struct method can be called as struct_obj.func1().

Rust also has Trait, which is like interface, with a set of method function signatures. A Trait is implemented for a Struct to have concrete method implementation. Trait supports inheritance.