@@ -5,7 +5,7 @@ use std::{
55 sync:: { Arc , Mutex , MutexGuard } ,
66} ;
77
8- use rosidl_runtime_rs:: { Message , Service as IdlService } ;
8+ use rosidl_runtime_rs:: { Message , Service as ServiceIDL } ;
99
1010use crate :: {
1111 error:: ToResult , rcl_bindings:: * , IntoPrimitiveOptions , MessageCow , Node , NodeHandle ,
@@ -71,7 +71,7 @@ pub type WorkerService<T, Payload> = Arc<ServiceState<T, Worker<Payload>>>;
7171/// [1]: std::sync::Weak
7272pub struct ServiceState < T , Scope >
7373where
74- T : IdlService ,
74+ T : ServiceIDL ,
7575 Scope : WorkScope ,
7676{
7777 /// This handle is used to access the data that rcl holds for this service.
8686
8787impl < T , Scope > ServiceState < T , Scope >
8888where
89- T : IdlService ,
89+ T : ServiceIDL ,
9090 Scope : WorkScope + ' static ,
9191{
9292 /// Returns the name of the service.
@@ -166,7 +166,7 @@ where
166166 }
167167}
168168
169- impl < T : IdlService > ServiceState < T , Node > {
169+ impl < T : ServiceIDL > ServiceState < T , Node > {
170170 /// Set the callback of this service, replacing the callback that was
171171 /// previously set.
172172 ///
@@ -192,7 +192,7 @@ impl<T: IdlService> ServiceState<T, Node> {
192192 }
193193}
194194
195- impl < T : IdlService , Payload : ' static + Send + Sync > ServiceState < T , Worker < Payload > > {
195+ impl < T : ServiceIDL , Payload : ' static + Send + Sync > ServiceState < T , Worker < Payload > > {
196196 /// Set the callback of this service, replacing the callback that was
197197 /// previously set.
198198 ///
@@ -238,15 +238,15 @@ impl<'a, T: IntoPrimitiveOptions<'a>> From<T> for ServiceOptions<'a> {
238238 }
239239}
240240
241- struct ServiceExecutable < T : IdlService , Scope : WorkScope > {
241+ struct ServiceExecutable < T : ServiceIDL , Scope : WorkScope > {
242242 handle : Arc < ServiceHandle > ,
243243 callback : Arc < Mutex < AnyServiceCallback < T , Scope :: Payload > > > ,
244244 commands : Arc < WorkerCommands > ,
245245}
246246
247247impl < T , Scope > RclPrimitive for ServiceExecutable < T , Scope >
248248where
249- T : IdlService ,
249+ T : ServiceIDL ,
250250 Scope : WorkScope ,
251251{
252252 unsafe fn execute ( & mut self , payload : & mut dyn Any ) -> Result < ( ) , RclrsError > {
@@ -317,9 +317,9 @@ impl ServiceHandle {
317317 // | rmw_take |
318318 // +---------------------+
319319 // ```
320- fn take_request < T : IdlService > ( & self ) -> Result < ( T :: Request , rmw_request_id_t ) , RclrsError > {
320+ fn take_request < T : ServiceIDL > ( & self ) -> Result < ( T :: Request , rmw_request_id_t ) , RclrsError > {
321321 let mut request_id_out = RequestId :: zero_initialized_rmw ( ) ;
322- type RmwMsg < T > = <<T as IdlService >:: Request as Message >:: RmwMsg ;
322+ type RmwMsg < T > = <<T as ServiceIDL >:: Request as Message >:: RmwMsg ;
323323 let mut request_out = RmwMsg :: < T > :: default ( ) ;
324324 let handle = & * self . lock ( ) ;
325325 unsafe {
@@ -335,11 +335,11 @@ impl ServiceHandle {
335335 }
336336
337337 /// Same as [`Self::take_request`] but includes additional info about the service
338- fn take_request_with_info < T : IdlService > (
338+ fn take_request_with_info < T : ServiceIDL > (
339339 & self ,
340340 ) -> Result < ( T :: Request , rmw_service_info_t ) , RclrsError > {
341341 let mut service_info_out = ServiceInfo :: zero_initialized_rmw ( ) ;
342- type RmwMsg < T > = <<T as IdlService >:: Request as Message >:: RmwMsg ;
342+ type RmwMsg < T > = <<T as ServiceIDL >:: Request as Message >:: RmwMsg ;
343343 let mut request_out = RmwMsg :: < T > :: default ( ) ;
344344 let handle = & * self . lock ( ) ;
345345 unsafe {
@@ -354,7 +354,7 @@ impl ServiceHandle {
354354 Ok ( ( T :: Request :: from_rmw_message ( request_out) , service_info_out) )
355355 }
356356
357- fn send_response < T : IdlService > (
357+ fn send_response < T : ServiceIDL > (
358358 self : & Arc < Self > ,
359359 request_id : & mut rmw_request_id_t ,
360360 response : T :: Response ,
0 commit comments