Rust 41 🦀 Returning Types that Implement Traits (impl Trait)
A generic function declares its type parameters in angle brackets, and the caller chooses the concrete types. An impl Trait return type inverts that relationship: the function chooses the concrete type, and the caller is told only that the type implements a trait. The syntax is -> impl Trait, and it reads as “this function…