RsRust · Lesson 4 of 8
Structs & Enums
Rust doesn't have classes, but it has structs + impl blocks, which are better in every way. Fight me.
Rust's enums are far more powerful than enums in most languages — each variant can hold different types of data. Combined with pattern matching, they make Rust code extremely expressive.