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