Loading tutorials
cargo. It also assumes you know Rust's primitive types (integers, booleans, strings) and how let and let mut bind variables. Nothing else is required.2 min readlet and let mut. It explains the distinction that most of Rust's syntax rests on: a statement does something, and an expression produces a value.2 min readlet and let mut. It covers how a function receives values and how it hands one back.2 min readlet and let mut, and the difference between a statement and an expression from the previous chapter.2 min readlet and let mut. It also assumes you have read the chapters on functions, expressions, and if/else. Rust has three repetition constructs: loop, while, and for. This chapter cove3 min readlet and let mut. It also assumes you have seen loop and while. Here you will use for to walk over ranges and collections, and you will learn the mistakes that trip people up most of3 min readlet and let mut, and have used loop, while, and for. You will learn two features of break: returning a value from a loop, and exiting an outer loop with a label.3 min readif/else expressions in Rust. It also assumes you know let bindings and the basic integer and string types.3 min readmatch, Option, and Result, and that you can write functions and loops. A match must cover every case. That is often more than you need when you care about only one pattern. Rust has three shorter forms for that situation.2 min readlet mut, Vec, and string slices. It shows how to give a function access to data without giving the data away.2 min readlet and let mut, and how match and Result work at a basic level. You will learn how to leave a function early with return, and how the ? operator shortens error handling.2 min readif/else expressions, and run programs with cargo run. It covers the working model of recursion in Rust and the errors you will most often meet.3 min readif/else and match are expressions. It covers functions that never return, and how the compiler uses that fact.2 min read