Search⌘ K

Exercises

Explore practical exercises that reinforce your understanding of Rust enums, including defining enum types with derived traits, implementing methods, and handling optional values. Learn to compile and run programs that use pattern matching and type safety features in Rust.

We'll cover the following...

Exercise 1

Make the example below compile and print success by defining a Size enum, adding a necessary #[derive(…​)] ...