Rust-Lernpfad

Structs, Enums und Traits

Daten mit Structs und Enums modellieren, Muster abgleichen, Option und Result behandeln, Verhalten mit Traits und Generics teilen.

Rust online ausprobieren

8 Lektionen

Structs

Group related values into your own type with named fields.

Lektion ansehen →

Enums

Define a type that is one of several variants, each with its own data.

Lektion ansehen →

Generics

Write one function or struct that works with many types.

Lektion ansehen →