@@ -100,13 +100,13 @@ trait RosApi {
100100impl RosApi for ClientHandle {
101101 /// Get the current time
102102 async fn get_time ( & self ) -> RosLibRustResult < rosapi:: GetTimeResponse > {
103- self . call_service ( "/rosapi/get_time" , rosapi:: GetTimeRequest { } )
103+ self . call_service :: < rosapi :: GetTime > ( "/rosapi/get_time" , rosapi:: GetTimeRequest { } )
104104 . await
105105 }
106106
107107 /// Get the list of topics active
108108 async fn topics ( & self ) -> RosLibRustResult < rosapi:: TopicsResponse > {
109- self . call_service ( "/rosapi/topics" , rosapi:: TopicsRequest { } )
109+ self . call_service :: < rosapi :: Topics > ( "/rosapi/topics" , rosapi:: TopicsRequest { } )
110110 . await
111111 }
112112
@@ -115,7 +115,7 @@ impl RosApi for ClientHandle {
115115 & self ,
116116 topic : impl Into < String > + Send ,
117117 ) -> RosLibRustResult < rosapi:: TopicTypeResponse > {
118- self . call_service (
118+ self . call_service :: < rosapi :: TopicType > (
119119 "/rosapi/topic_type" ,
120120 rosapi:: TopicTypeRequest {
121121 topic : topic. into ( ) ,
@@ -129,7 +129,7 @@ impl RosApi for ClientHandle {
129129 & self ,
130130 topic_type : impl Into < String > + Send ,
131131 ) -> RosLibRustResult < rosapi:: TopicsForTypeResponse > {
132- self . call_service (
132+ self . call_service :: < rosapi :: TopicsForType > (
133133 "/rosapi/topics_for_type" ,
134134 rosapi:: TopicsForTypeRequest {
135135 r#type : topic_type. into ( ) ,
@@ -140,7 +140,7 @@ impl RosApi for ClientHandle {
140140
141141 /// Returns list of nodes active in a system
142142 async fn get_nodes ( & self ) -> RosLibRustResult < rosapi:: NodesResponse > {
143- self . call_service ( "/rosapi/nodes" , rosapi:: NodesRequest { } )
143+ self . call_service :: < rosapi :: Nodes > ( "/rosapi/nodes" , rosapi:: NodesRequest { } )
144144 . await
145145 }
146146
@@ -150,7 +150,7 @@ impl RosApi for ClientHandle {
150150 & self ,
151151 node : impl Into < String > + Send ,
152152 ) -> RosLibRustResult < rosapi:: NodeDetailsResponse > {
153- self . call_service (
153+ self . call_service :: < rosapi :: NodeDetails > (
154154 "/rosapi/node_details" ,
155155 rosapi:: NodeDetailsRequest { node : node. into ( ) } ,
156156 )
@@ -162,7 +162,7 @@ impl RosApi for ClientHandle {
162162 & self ,
163163 service : impl Into < String > + Send ,
164164 ) -> RosLibRustResult < rosapi:: ServiceNodeResponse > {
165- self . call_service (
165+ self . call_service :: < rosapi :: ServiceNode > (
166166 "/rosapi/service_node" ,
167167 rosapi:: ServiceNodeRequest {
168168 service : service. into ( ) ,
@@ -178,7 +178,7 @@ impl RosApi for ClientHandle {
178178 param_name : impl Into < String > + Send ,
179179 param_value : impl Into < String > + Send ,
180180 ) -> RosLibRustResult < rosapi:: SetParamResponse > {
181- self . call_service (
181+ self . call_service :: < rosapi :: SetParam > (
182182 "/rosapi/set_param" ,
183183 rosapi:: SetParamRequest {
184184 name : param_name. into ( ) ,
@@ -194,7 +194,7 @@ impl RosApi for ClientHandle {
194194 & self ,
195195 param_name : impl Into < String > + Send ,
196196 ) -> RosLibRustResult < rosapi:: GetParamResponse > {
197- self . call_service (
197+ self . call_service :: < rosapi :: GetParam > (
198198 "/rosapi/get_param" ,
199199 rosapi:: GetParamRequest {
200200 name : param_name. into ( ) ,
@@ -206,16 +206,19 @@ impl RosApi for ClientHandle {
206206
207207 /// Gets the list of currently known parameters.
208208 async fn get_param_names ( & self ) -> RosLibRustResult < rosapi:: GetParamNamesResponse > {
209- self . call_service ( "/rosapi/get_param_names" , rosapi:: GetParamNamesRequest { } )
210- . await
209+ self . call_service :: < rosapi:: GetParamNames > (
210+ "/rosapi/get_param_names" ,
211+ rosapi:: GetParamNamesRequest { } ,
212+ )
213+ . await
211214 }
212215
213216 /// Checks whether the given parameter is defined.
214217 async fn has_param (
215218 & self ,
216219 param : impl Into < String > + Send ,
217220 ) -> RosLibRustResult < rosapi:: HasParamResponse > {
218- self . call_service (
221+ self . call_service :: < rosapi :: HasParam > (
219222 "/rosapi/has_param" ,
220223 rosapi:: HasParamRequest { name : param. into ( ) } ,
221224 )
@@ -227,7 +230,7 @@ impl RosApi for ClientHandle {
227230 & self ,
228231 name : impl Into < String > + Send ,
229232 ) -> RosLibRustResult < rosapi:: DeleteParamResponse > {
230- self . call_service (
233+ self . call_service :: < rosapi :: DeleteParam > (
231234 "/rosapi/delete_param" ,
232235 rosapi:: DeleteParamRequest { name : name. into ( ) } ,
233236 )
@@ -239,7 +242,7 @@ impl RosApi for ClientHandle {
239242 & self ,
240243 message_name : impl Into < String > + Send ,
241244 ) -> RosLibRustResult < rosapi:: MessageDetailsResponse > {
242- self . call_service (
245+ self . call_service :: < rosapi :: MessageDetails > (
243246 "/rosapi/message_details" ,
244247 rosapi:: MessageDetailsRequest {
245248 r#type : message_name. into ( ) ,
@@ -253,7 +256,7 @@ impl RosApi for ClientHandle {
253256 & self ,
254257 topic : impl Into < String > + Send ,
255258 ) -> RosLibRustResult < rosapi:: PublishersResponse > {
256- self . call_service (
259+ self . call_service :: < rosapi :: Publishers > (
257260 "/rosapi/publishers" ,
258261 rosapi:: PublishersRequest {
259262 topic : topic. into ( ) ,
@@ -267,7 +270,7 @@ impl RosApi for ClientHandle {
267270 & self ,
268271 service : impl Into < String > + Send ,
269272 ) -> RosLibRustResult < rosapi:: ServiceHostResponse > {
270- self . call_service (
273+ self . call_service :: < rosapi :: ServiceHost > (
271274 "/rosapi/service_host" ,
272275 rosapi:: ServiceHostRequest {
273276 service : service. into ( ) ,
@@ -281,7 +284,7 @@ impl RosApi for ClientHandle {
281284 & self ,
282285 service_type : impl Into < String > + Send ,
283286 ) -> RosLibRustResult < rosapi:: ServiceProvidersResponse > {
284- self . call_service (
287+ self . call_service :: < rosapi :: ServiceProviders > (
285288 "/rosapi/service_providers" ,
286289 rosapi:: ServiceProvidersRequest {
287290 service : service_type. into ( ) ,
@@ -295,7 +298,7 @@ impl RosApi for ClientHandle {
295298 & self ,
296299 service_type : impl Into < String > + Send ,
297300 ) -> RosLibRustResult < rosapi:: ServiceRequestDetailsResponse > {
298- self . call_service (
301+ self . call_service :: < rosapi :: ServiceRequestDetails > (
299302 "/rosapi/service_request_details" ,
300303 rosapi:: ServiceRequestDetailsRequest {
301304 r#type : service_type. into ( ) ,
@@ -309,7 +312,7 @@ impl RosApi for ClientHandle {
309312 & self ,
310313 service_type : impl Into < String > + Send ,
311314 ) -> RosLibRustResult < rosapi:: ServiceRequestDetailsResponse > {
312- self . call_service (
315+ self . call_service :: < rosapi :: ServiceRequestDetails > (
313316 "/rosapi/service_response_details" ,
314317 rosapi:: ServiceRequestDetailsRequest {
315318 r#type : service_type. into ( ) ,
@@ -323,7 +326,7 @@ impl RosApi for ClientHandle {
323326 & self ,
324327 service_name : impl Into < String > + Send ,
325328 ) -> RosLibRustResult < rosapi:: ServiceTypeResponse > {
326- self . call_service (
329+ self . call_service :: < rosapi :: ServiceType > (
327330 "/rosapi/service_type" ,
328331 rosapi:: ServiceTypeRequest {
329332 service : service_name. into ( ) ,
@@ -334,7 +337,7 @@ impl RosApi for ClientHandle {
334337
335338 /// Get the list of services active on the system
336339 async fn get_services ( & self ) -> RosLibRustResult < rosapi:: ServicesResponse > {
337- self . call_service ( "/rosapi/services" , rosapi:: ServicesRequest { } )
340+ self . call_service :: < rosapi :: Services > ( "/rosapi/services" , rosapi:: ServicesRequest { } )
338341 . await
339342 }
340343
0 commit comments