I wrote an initial version of my RPi3 Rust project, project Ada, conforming to this design back in August.
The plan to achieve loose coupling was to use constructor dependency injection. And I ran into the twin brick walls of dynamic dispatch (undesirable for project Ada) and limitations of object-safety (irreconcilable, AFAICT with a fluent API, which loves to return Self).
So I had to retool to figure out a way to do static dependency injection, which would bypass both issues.
I have a (primitive) solution; you can see a trivial, static dependency-injected “Hello, World” example here*.
This week (and possibly next), refactor project Ada to use this static dependency injection technique and maybe also add concurrency.
*If this static dependency injection technique works out, I plan to create a
register_type_as_trait! macro to make construction of the container idiomatic (automatic and painless, possibly as a
code_gen build script).