top of page

Search


Option vs Result in Rust: What’s the Real Difference?
If you’ve written Rust for more than a few days, you’ve probably hit this moment: You’re writing a function, something might fail, and now you’re staring at your screen thinking, “Should I return an Option or a Result?” They both kind of mean “something might go wrong,” but they’re not interchangeable. Let’s break it down in plain English. Option<T> — Sometimes There’s Just Nothing Option is Rust’s gentle way of saying, “Hey, there might be nothing here, and that’s okay.”No

Ruud Wijnands
Oct 262 min read


Rust Basics of Checking Command-Line Arguments
In Rust, you typically read command-line arguments using the standard library’s std::env::args() function. This function returns an...

Ruud Wijnands
Jan 181 min read
![Understanding #[derive(Debug)]](https://static.wixstatic.com/media/44764b_c99a7b06022d4e3e9d8441b488d97b61~mv2.webp/v1/fill/w_333,h_250,al_c,q_30,blur_30,enc_avif,quality_auto/44764b_c99a7b06022d4e3e9d8441b488d97b61~mv2.webp)
![Understanding #[derive(Debug)]](https://static.wixstatic.com/media/44764b_c99a7b06022d4e3e9d8441b488d97b61~mv2.webp/v1/fill/w_454,h_341,al_c,q_90,enc_avif,quality_auto/44764b_c99a7b06022d4e3e9d8441b488d97b61~mv2.webp)
Understanding #[derive(Debug)]
In Rust, #[derive(Debug)] is an attribute macro used to automatically generate an implementation of the Debug trait for a custom data...

Ruud Wijnands
Dec 1, 20242 min read
bottom of page

