typestar

Ownership & borrowing

15 steps in 6 sets of Rust.

The tour where Rust stops being familiar. Move semantics first, then borrowing, then the slices and string types that exist because borrowing does. Structs and methods, and finally the smart pointers for when a single owner is genuinely the wrong model.

Fifteen steps that everyone finds harder than the count suggests. The borrow checker is not being difficult for the sake of it, and the moment that clicks is the moment Rust starts paying you back.

Start this tour

Move & clone

Borrowing

Slices & strings

Structs & methods

Smart pointers

Encore

  • rpn.rsEvaluate a reverse-Polish expression with a Vec stack.

The other Rust tours