|
|
AsRef, Borrow, and signatures your callers can actually use
|
Medium
|
Primitives
|
|
|
|
Associated type or generic parameter?
|
Hard
|
Primitives
|
|
|
|
Blanket impls, and why you can never carve out an exception
|
Hard
|
Primitives
|
|
|
|
Box<dyn Trait>: trait objects, DSTs and dynamic dispatch
|
Medium
|
Primitives
|
|
|
|
BTreeMap range queries
|
Medium
|
Primitives
|
|
|
|
Capstone: a fully-typed fallible parser
|
Hard
|
End-to-End
|
|
|
|
Cow in API design: impl Into<Cow<str>>
|
Hard
|
Framework
|
|
|
|
Custom hashing: beating SipHash on integer keys
|
Hard
|
End-to-End
|
|
|
|
Deref and the coercion you have been using all along
|
Medium
|
Primitives
|
|
|
|
Deref polymorphism, and the day your method disappears
|
Medium
|
Primitives
|
|
|
|
#[derive(Debug)] and the three shapes of debug output
|
Easy
|
Primitives
|
|
|
|
Deriving traits, and when derive gets the bounds wrong
|
Easy
|
Primitives
|
|
|
|
Display, Debug, and the ToString blanket impl
|
Easy
|
Primitives
|
|
|
|
Dyn compatibility: the actual rules
|
Hard
|
Primitives
|
|
|
|
Enum dispatch: the third option
|
Medium
|
End-to-End
|
|
|
|
Extension traits: adding methods to types you do not own
|
Medium
|
Primitives
|
|
|
|
Fn, FnMut, FnOnce: the closure hierarchy
|
Medium
|
Primitives
|
|
|
|
From impls: the machinery behind `?`
|
Medium
|
Primitives
|
|
|
|
From, Into, and your first blanket impl with teeth
|
Medium
|
Primitives
|
|
|
|
From, Into, TryFrom: conversions that cannot lie
|
Medium
|
Primitives
|
|
|
|
Generics, traits and lifetimes in one signature
|
Medium
|
Primitives
|
|
|
|
Hash and the Hash/Eq contract
|
Medium
|
Primitives
|
|
|
|
HashMap fundamentals: get, get_mut and the Hash/Eq contract
|
Easy
|
Primitives
|
|
|
|
Implementing std::error::Error
|
Medium
|
Primitives
|
|
|
|
Implement Iterator by hand: the Collatz sequence
|
Medium
|
Primitives
|
|
|
|
IntoIterator: one bound that accepts five containers
|
Medium
|
Primitives
|
|
|
|
Make your own collection iterable, all three ways
|
Hard
|
Framework
|
|
|
|
Operator overloading: + is just a trait method
|
Medium
|
Primitives
|
|
|
|
PartialEq and Eq: why floats can be compared but not Eq
|
Medium
|
Primitives
|
|
|
|
PartialOrd and Ord: derived ordering follows declaration order
|
Medium
|
Primitives
|
|
|
|
Sealed traits: public to use, closed to implement
|
Medium
|
Primitives
|
|
|
|
SemVer for Rust APIs: what actually breaks
|
Hard
|
Framework
|
|
|
|
size_hint and DoubleEndedIterator: an iterator with two ends
|
Hard
|
Primitives
|
|
|
|
String building: push_str, write!, and the 590x cliff
|
Easy
|
Primitives
|
|
|
|
Supertraits and default methods
|
Medium
|
Primitives
|
|
|
|
The `Future` trait: `Output`, `Poll`, and your first hand-written future
|
Easy
|
Primitives
|
|
|
|
The orphan rule and the newtype escape
|
Hard
|
Primitives
|
|
|
|
Traits as shared behaviour
|
Easy
|
Primitives
|
|
|
|
TryFrom, TryInto, and the type that cannot exist
|
Medium
|
Primitives
|
|
|
|
Tuple structs and unit structs: the other two shapes
|
Easy
|
Primitives
|
|
|
|
use declarations: nested groups, as, self, and _
|
Medium
|
Primitives
|
|
|
|
Write your own adapters, with an extension trait
|
Hard
|
Framework
|
|