Skip to content

Glossary: Software Design Patterns in Rust

Trait object

Also written: trait objects

A value used through `dyn Trait`, usually in a `Box`, so different types can share one type. `Box<dyn Pricing>` holds any value implementing Pricing.

Where the book teaches it

Related terms

BoxDynamic dispatch