Rust traits and dependency injection
BRANK
Dependency injection is one of my favorite design patterns to develop highly-testable and modular code. Unfortunately, applying this pattern by taking Rust traits as arguments to public functions has unintended consequences on the visibility of private symbols. Let’s look at why and what we can do about it.
1 comments
dependency injectionとinjectされる型の話
Rust traits and dependency injection - Julio Merino (jmmv.dev)
jmmv.dev/2022/04/rust-t…