The Protobuf file I'm building, which is from a commercial software vendor (no changes to the server or interface possible), contains a service method called Connect:
rpc Connect (ConnectRequest) returns (ConnectResponse);
The generated code then has a compile error due to a name conflict, as there is apparently a function of the same name in the framework:
**838** **|** **/** pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
**839** **|** **|** where
**840** **|** **|** D: TryInto<tonic::transport::Endpoint>,
**841** **|** **|** D::Error: Into<StdError>,
**|** **|_____________________________________^** **duplicate definitions for `connect`**
**...**
**1045** **|** **/** pub async fn connect(
**1046** **|** **|** &mut self,
**1047** **|** **|** request: impl tonic::IntoRequest<super::ConnectRequest>,
**1048** **|** **|** ) -> std::result::Result<
**1049** **|** **|** tonic::Response<super::ConnectResponse>,
**1050** **|** **|** tonic::Status,
**1051** **|** **|** > {
**| |_________-** **other definition for `connect`**
I can change the generated code and rename the non-service method, but obviously a hack like that won't work in a pipeline.
Searching the tonic-build source, I'm not seeing a way to generate a qualified name or any other workaround.