Skip to content

Glossary: Software Design Patterns in Rust

Service locator

A global registry that code asks for its dependencies. It hides what code needs and forces tests to change the global, the opposite of injection.

Where the book teaches it

Related terms

Dependency injectionRegistryGlobal mutable state