Hey everyone. I’m a Rust beginner, but am already contributing to the community: daringordon.com/rust_tutorials/
I’m interested in reproducing a “service registry” design pattern in Rust where by a key/value registry contains “services”, each that implements a uniquely identifiable Trait. The intent here is to allow modules from anywhere in an application to look up and borrow a service to accomplish a task, without knowing the concrete implementation but rather only the Trait (contract) that is implemented.
One example of this in the wild is within the Pyramid Web framework (Python), which makes extensive use of the zope component architecture (and consequently zope interfaces).
How would you approach this design and would you consider this design pattern rustic?