Skip to content

Glossary: Software Design Patterns in Rust

Box

Also written: Box<T>, Box<dyn Trait>

An owning pointer that puts a value on the heap. `Box<dyn Rule>` lets values of different types, whose sizes differ, sit together in one Vec.

Where the book teaches it

Related terms

Trait objectDynamic dispatch