학습 경로

구조체, 열거형, 트레이트

구조체와 열거형으로 데이터를 모델링하고, 패턴 매칭을 쓰고, Option과 Result를 다루고, 트레이트와 제네릭으로 동작을 공유합니다.

레슨 10개 · 챌린지 14개

  1. 레슨 챌린지 1개 Structs Group related values into your own type with named fields.
  2. 레슨 챌린지 2개 Methods and impl Blocks Attach functions to a struct with impl, including constructors.
  3. 레슨 챌린지 1개 Enums Define a type that is one of several variants, each with its own data.
  4. 레슨 챌린지 2개 Pattern Matching with match Compare a value against patterns with match, guards and if let.
  5. 레슨 챌린지 1개 Temperature Converter Convert between Celsius and Fahrenheit with an enum.
  6. 레슨 챌린지 2개 Option: Values That May Be Missing Represent a missing value with Option instead of null.
  7. 레슨 챌린지 2개 Error Handling with Result Return errors as values with Result and pass them on with the ? operator.
  8. 레슨 챌린지 1개 Bank Account with Result Model deposits and withdrawals that can fail with your own error type.
  9. 레슨 챌린지 1개 Traits Describe shared behavior with a trait and implement it for different types.
  10. 레슨 챌린지 1개 Generics Write one function or struct that works with many types.