Skip to content

Trait Objects practice problems in Rust

Difficulty:
Category:
Tag:

Showing 9 of 9

Status Title Difficulty
Box<dyn Trait>: trait objects, DSTs and dynamic dispatch Medium
Boxed errors and downcasting Medium
Closures 101: build a pipeline of boxed closures Easy
Dispatch through Rc: Rc<dyn Trait> and shared behaviour Medium
Dyn compatibility: the actual rules Hard
move: when the closure must own its captures Medium
Static vs dynamic dispatch, measured Hard
Trait objects and lifetimes: Box<dyn Trait + 'a> Hard
`T: 'static` in practice — a type-erased handler registry Hard