Skip to content

Glossary: Software Design Patterns in Rust

Static dispatch

Also written: impl Trait

Accepting "anything with this trait" via `&impl Rule` or generics, where the compiler builds one copy of the function per type. It suits one known type.

Where the book teaches it

Related terms

Dynamic dispatchGeneric