RustObject-oriented Rust


Introduction

Rust is object oriented in that its algebraic data types can have associated methods, making them objects in the sense of data stored along with code that knows how to work with it.

Rust does not, however, support inheritance, favoring composition with Traits. This means many OO patterns don't work as-is and must be modified. Some are totally irrelevant.