I now want to implement the encapsulation of the server-side code call, convenient call (some people may say, why to encapsulate, my purpose is, after encapsulation, I can put the server-side logic to the parameter, there is no need to repeat the use of Server::builder()), my approach is:
Question:grpc_srv_fun() function of the srv parameter type is always an error, can I have the tonic::transport::server::Server.add_service() constraint parameter type, or an error, turn to your bosses
Tonic server uses encapsulation
proto file
build.rs code
server side original call code
I now want to implement the encapsulation of the server-side code call, convenient call (some people may say, why to encapsulate, my purpose is, after encapsulation, I can put the server-side logic to the parameter, there is no need to repeat the use of Server::builder()), my approach is:
Question:
grpc_srv_fun()
function of thesrv
parameter type is always an error, can I have thetonic::transport::server::Server.add_service()
constraint parameter type, or an error, turn to your bosses