Error Handling, Traits & Async. Error Handling with Result & Option. // Option<T> — value may or may not exist fn find_user(id: u32) -> Option<String> { if id == 1 { Some(String::from("Alice")) } else { None } } match fi…
ReadRust Interview Questions. Q: What is the borrow checker and why does Rust have it?. The borrow checker enforces ownership rules at compile time, preventing: use-after-free (using memory after it's freed), dangling pointe…
ReadCore Language & Ownership. Basics. // Variables (immutable by default!) let x = 5; let mut y = 10; // mutable y += 1; // Type annotations let n: i32 = 42; let f: f64 = 3.14; let b: bool = true; let s: &str = "hello"; // …
ReadSave this stack to your personal DevRecall — add your own notes, track what you're learning, and share what you know with the community.
Get started — free forever