Skip to main content
  1. 🏷️ Tags/

Basics

2026

Rust basics: Option and Result

·481 words·3 mins
Rust does not use null for ordinary absence, and it does not rely on exceptions for recoverable errors. Instead, it uses enums: Option<T> and Result<T, E>. These two types show up everywhere. If you understand them early, a lot of Rust APIs stop looking strange.

Rust basics: structs and enums

·587 words·3 mins
Structs and enums are the core of Rust data modeling. Structs group fields together. Enums describe a value that can be one of several well-defined variants. If you are coming from languages where data modeling is mostly “objects everywhere”, Rust feels different at first. It prefers explicit data shapes plus separate behavior.

Rust basics: let, mut, and shadowing

·481 words·3 mins
Rust variables are really bindings. Once that clicks, let, mut, and shadowing stop feeling like syntax trivia and start feeling like design choices. Rust pushes you toward immutability by default. That is not just style. It reduces accidental state changes and makes data flow easier to follow.

Rust basics: functions and types

·598 words·3 mins
Rust functions are explicit at the boundary and flexible inside the body. You spell out parameter and return types, then let inference do most of the local work. That balance is one of Rust’s better design choices. Signatures stay readable, but the code inside them does not turn into annotation noise.

Rust basics: control flow

·665 words·4 mins
Rust control flow is more than branching and loops. The important part is that many control-flow forms are expressions, which means they produce values. That design shows up everywhere in day-to-day Rust. It makes code concise, but it also forces you to be explicit about the shapes of the values you return.