Skip to content

Generics practice problems in Rust

Difficulty:
Category & tags Filters active
Category:
Tag:

Showing 14 of 14

Title Difficulty
Associated type or generic parameter? Hard
Build a generic stack with conditional methods Medium
Fn, FnMut, FnOnce: the closure hierarchy Medium
Folding an AST: separating traversal from action Hard
Generics, traits and lifetimes in one signature Medium
Named generics and impl Trait parameters Medium
Replace a manual default with a derive Easy
Schedule destruction with a by-value helper Easy
Select type arguments with a turbofish Easy
Sum collections and iterators with IntoIterator Medium
Trait bounds and why f64 is not Ord Easy
Traits as shared behaviour Easy
where clauses and the bound you cannot write inline Easy
Write your own adapters, with an extension trait Hard