Replies: 1 comment
-
Hi, the The solution is to transfer other data types by other means, since remoc does not limit you to one channel. These other means can be further Remoc channels or parameters or return value of remote traits. In your comment you write that If, for some reason, you need to exchange multiple data types over a single channel, the solution is to define a Rust enum that holds all the data types you want to transfer. Remoc channels and remote trait clients can be transferred as fields of user-defined enums and structs. It would help if you would share a repository with your code. This way I could check if your approach can be simplified. Hope that helps! |
Beta Was this translation helpful? Give feedback.
-
Hi,
this is not strictly a remoc problem but seems close enough, so I hope I can get some help over here.
I'm currently using remoc in a project and I really like it. Using the ConnectExt::provide() method to send a single trait object to a remote endpoint works great. What I want to do now is, to keep the base channel around and dynamically send one ore more other trait objects to the endpoint. Something like this:
The problem is, that rustc can't infer the types of tx and rx (or inferes it to TraitA, when that object is send directly). What is
the idiomatic way to have more than one remote trait with remoc?
Thanks,
Tim
Beta Was this translation helpful? Give feedback.
All reactions