学習パス

所有権と借用

ムーブ、参照、スライス、ライフタイム、スマートポインター。ガベージコレクターなしで Rust のメモリ安全性を支える考え方です。

レッスン 5 件 · チャレンジ 7 件

  1. レッスン チャレンジ 1 件 Ownership and Moves Learn the rule behind Rust's memory safety: every value has one owner.
  2. レッスン チャレンジ 2 件 References and Borrowing Let a function use a value without taking ownership of it.
  3. レッスン チャレンジ 2 件 Slices Borrow part of a string or array without copying it.
  4. レッスン チャレンジ 1 件 Lifetimes Tell the compiler how long references stay valid with lifetime annotations.
  5. レッスン チャレンジ 1 件 Smart Pointers: Box and Rc Put data on the heap with Box and share ownership with Rc.