rsRustPrimer
< Back to modules

Language basics

Variables, types, functions and control flow: the core grammar of Rust.

  1. 1
    Variables and mutabilityImmutable by default, mut when needed, and shadowing.
  2. 2
    Basic typesIntegers, floats, booleans, characters, tuples and arrays.
  3. 3
    Functions and expressionsTyped signatures, and why the last semicolon matters.
  4. 4
    Control flowif as an expression, the three loops and a first match.
  5. ◆
    Project: positive exposureRunning projectFirst business logic in riskforge: exposure and expected exposure.