Skip to main content
DevSecOps, pentesting and blue team. Writeups and tooling.

m58

DevSecOps ยท Pentest ยท Blue team

Hero

DevSecOps, pentesting, blue team. Posts below or use the menu.

Recent

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: & vs * (references and dereferencing)

·569 words·3 mins
& borrows a value. * follows a reference to reach the value behind it. The syntax is small, but it sits right in the middle of Rust’s ownership model. If references feel awkward at first, that is normal. In Rust they are not just pointers with nicer spelling. They are part of the language’s safety model.

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.