Skip to content

Trait Objects practice problems in Rust

Difficulty:
Category & tags Filters active
Category:
Tag:

Showing 9 of 9

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
Keep concrete methods while enabling trait objects Hard
move: when the closure must own its captures Medium
Static vs dynamic dispatch Hard
Store owned and borrowed closures in registries Hard
Trait objects and lifetimes: Box<dyn Trait + 'a> Hard