Skip to content

Glossary: Software Design Patterns in Rust

Delegation

Also written: delegate

Handing a job to a value you hold instead of doing it yourself. Product::total asks its pricing part, then its wrapping part, and adds the answers.

Where the book teaches it

Related terms

Composition