Replies: 1 comment
-
So add_service doesn't have support for dynamically adding services due to its typed builder nature. One way to get all the services into a vec would be to use an enum that has a type for each one but this won't help you when trying to work with the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Sort of a newbie question:
I have multiple services defined via proto files and tonic_build. Works perfectly.
Foo.proto
Bar.proto
Now I have multiple structs in these files (I use the server implementations).
struct FooServer ...
struct BarServer ...
I use them to create the services that I then add to tonic. It's all working beautifully.
What I cannot wrap my head around: how do I define a generic type for these structs so that I can put all of them into one Vec and then add them with one by one with
add_service
?Thanks for any pointers.
Beta Was this translation helpful? Give feedback.
All reactions