覚えておきたい基本トレイト

  • モノから文字列への変換 - ToString
  • プリント出力 - Display / Debug
  • 初期値 - Default
  • 変換 - From<T> / Into<T>
  • コピーの生成 - Clone / Copy
  • 失敗のある変換 - FromStr
    • ToString は失敗しない変換
  • 参照変換 - AsRef<T: ?Sized>
  • オーナーシップ - Borrow
    • String - owe their data
    • &str - borro data from an owned type
  • I/O - Read / Write
  • Iteration - Iterator / IntoIterator