Surprising, delightful, and deep aspects of Rust — one digestible nugget at a time
Every nugget reveals something about Rust's type system, trait system, or ownership model that you might not have noticed at first glance.
Rust code throughout. No other languages.
parse()How one method call does so much — FromStr, type inference, turbofish, and custom parseable types.
Debug and Display — why println! won't work with your struct and how to fix it.
Why values 'disappear' in Rust — the Copy and Clone traits and ownership basics.
Why == doesn't compile on your struct — PartialEq, Eq, and the NaN gotcha.
Defining a trait, implementing it for Dog and Cat — Rust's version of an interface.
Trait bounds — fn greet<T: Speak>(a: &T) works with any type that implements Speak.
Adding methods to types you don't own — .is_email() on &str and the itertools crate.
Storing Dogs and Cats in the same Vec — Box<dyn Speak> and dynamic dispatch.
8 nuggets — a beginner-friendly tour through Rust's trait system