Glossary: Software Design Patterns in Rust
Simple factory
One function that knows every type and turns a name into the right value, such as create_carrier("ups"). A new carrier is a struct, an impl and a match arm.
Glossary: Software Design Patterns in Rust
One function that knows every type and turns a name into the right value, such as create_carrier("ups"). A new carrier is a struct, an impl and a match arm.