|
Accept string-like values with AsRef
|
Medium
|
Primitives
|
|
|
Associated type or generic parameter?
|
Hard
|
Primitives
|
|
|
Blanket implementations: shared behavior and overlap
|
Hard
|
Primitives
|
|
|
Box<dyn Trait>: trait objects, DSTs and dynamic dispatch
|
Medium
|
Primitives
|
|
|
BTreeMap range queries
|
Medium
|
Primitives
|
|
|
Build a CSV record with one output buffer
|
Easy
|
Primitives
|
|
|
Capstone: compose parser errors and their causes
|
Hard
|
End-to-End
|
|
|
Choose the intended method through a wrapper
|
Medium
|
Primitives
|
|
|
Compare weighted records without requiring Eq
|
Medium
|
Primitives
|
|
|
Convert distances with tuple and unit structs
|
Easy
|
Primitives
|
|
|
Convert temperatures with From and Into
|
Medium
|
Primitives
|
|
|
Cow in API design: impl Into<Cow<str>>
|
Hard
|
Framework
|
|
|
Define a structured validation error
|
Medium
|
Primitives
|
|
|
Delegate shape methods through an enum
|
Medium
|
End-to-End
|
|
|
Derive consistent ordering for versions and priorities
|
Medium
|
Primitives
|
|
|
#[derive(Debug)] and the three shapes of debug output
|
Easy
|
Primitives
|
|
|
Expose a string view with Deref
|
Medium
|
Primitives
|
|
|
Extension traits: adding methods to types you do not own
|
Medium
|
Primitives
|
|
|
Fn, FnMut, FnOnce: the closure hierarchy
|
Medium
|
Primitives
|
|
|
Format money with Display
|
Easy
|
Primitives
|
|
From impls: the machinery behind ?
|
Medium
|
Primitives
|
|
|
From, Into, TryFrom: conversions that cannot lie
|
Medium
|
Primitives
|
|
|
Generics, traits and lifetimes in one signature
|
Medium
|
Primitives
|
|
|
Implement a custom hasher for integer keys
|
Hard
|
End-to-End
|
|
|
Implementing traits with a newtype
|
Hard
|
Primitives
|
|
|
Implement Iterator by hand: the Collatz sequence
|
Medium
|
Primitives
|
|
|
Keep concrete methods while enabling trait objects
|
Hard
|
Primitives
|
|
|
Look up and update HashMap values
|
Easy
|
Primitives
|
|
|
Make hashing agree with equality
|
Medium
|
Primitives
|
|
|
Make your own collection iterable, all three ways
|
Hard
|
Framework
|
|
|
Operator overloading: + is just a trait method
|
Medium
|
Primitives
|
|
|
Replace a manual default with a derive
|
Easy
|
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
|
|
|
Sum collections and iterators with IntoIterator
|
Medium
|
Primitives
|
|
|
Supertraits and default methods
|
Medium
|
Primitives
|
|
The Future trait: Output, Poll, and your first hand-written future
|
Easy
|
Primitives
|
|
|
Traits as shared behaviour
|
Easy
|
Primitives
|
|
|
TryFrom and TryInto: validate a percentage
|
Medium
|
Primitives
|
|
|
use declarations: nested groups, as, self, and _
|
Medium
|
Primitives
|
|
|
Write your own adapters, with an extension trait
|
Hard
|
Framework
|
|