Skip to content

Glossary: Software Design Patterns in Rust

Factory method

A pattern where a trait has a required method (like make_carrier) that each implementer uses to choose what to build, while default methods use the result.

Where the book teaches it

Related terms

Simple factoryAbstract factory