Glossary: Software Design Patterns in Rust
Constructor injection
Passing a struct the dependencies it needs through its `new` function, so it keeps them instead of creating them. OrderLog::new takes a repo, clock and notifier.
Glossary: Software Design Patterns in Rust
Passing a struct the dependencies it needs through its `new` function, so it keeps them instead of creating them. OrderLog::new takes a repo, clock and notifier.