In the documentation for Resource and Bus, it only says it "attaches a resource to the bus". However, there's no example of using a resource in Resource and the examples snippets that exist in Bus show creating the bus and then immediately trying to take a resource (which I assume would always fail). None of the example programs use Resource either as far as I can see.
After reading the documentation and examples, I had no idea of how resources got onto a Bus - it seemed like maybe they were created via the Default trait but the documentation didn't say that was required. I eventually found an example looking through your tab-rs project but having to read through a large project isn't ideal.
Unfortunately, the store_resource function is hidden away in the dyn_bus module - which I didn't even look at since it seemed like it was a low-level module that the higher level interfaces were built on. It would be helpful to at least mention the existence of store_resource in the Bus and Resource documentation.
I hope this doesn't come off as entitled. Your project looks interesting!
In the documentation for
Resource
andBus
, it only says it "attaches a resource to the bus". However, there's no example of using a resource inResource
and the examples snippets that exist inBus
show creating the bus and then immediately trying to take a resource (which I assume would always fail). None of the example programs useResource
either as far as I can see.After reading the documentation and examples, I had no idea of how resources got onto a
Bus
- it seemed like maybe they were created via theDefault
trait but the documentation didn't say that was required. I eventually found an example looking through your tab-rs project but having to read through a large project isn't ideal.Unfortunately, the
store_resource
function is hidden away in thedyn_bus
module - which I didn't even look at since it seemed like it was a low-level module that the higher level interfaces were built on. It would be helpful to at least mention the existence ofstore_resource
in theBus
andResource
documentation.I hope this doesn't come off as entitled. Your project looks interesting!