Skip to content

Glossary: Rust Beyond the Basics

trait object

Also written: trait objects

A value used through `dyn Trait`, of any type with that trait. It lets different types, like a `CoffeeBag` and a `Mug`, sit in one `Vec`.

Where the book teaches it

Related terms

dynBox