Explain to Me Like I'm 5: Dependency Injection

53 points don_ilto

I had a hard time grasping the concept of dependency injection with Rust, since most examples online are for languages with inheritance. When it finally clicked, I wrote it down in the simplest way possible. Maybe this helps another fellow beginner Rustacean! https://www.bumbar.blog/tech/dependency-injection-with-rust/

Also, if you know of good advanced tutorials (maybe using a real-world scenario, a specialized framework,...), I'd love to read it.