Skip to content

Glossary: Rust Beyond the Basics

static dispatch

Also written: dynamic dispatch

With `impl Trait` or generics, the compiler knows the exact type and chooses the method while compiling (static). With `dyn Trait`, the program looks up the method while running (dynamic), which lets mixed types share a list.

Where the book teaches it

Related terms

trait objectmonomorphizationdyn