@@ -10,7 +10,7 @@ pub use self::service::*;
10
10
pub use self :: subscription:: * ;
11
11
12
12
use crate :: rcl_bindings:: * ;
13
- use crate :: { Context , ParameterOverrideMap , QoSProfile , RclrsError , ToResult , Waitable } ;
13
+ use crate :: { Context , ParameterOverrideMap , QoSProfile , RclrsError , ToResult } ;
14
14
15
15
use std:: cmp:: PartialEq ;
16
16
use std:: ffi:: CStr ;
@@ -72,9 +72,9 @@ unsafe impl Send for rcl_node_t {}
72
72
pub struct Node {
73
73
rcl_node_mtx : Arc < Mutex < rcl_node_t > > ,
74
74
pub ( crate ) rcl_context_mtx : Arc < Mutex < rcl_context_t > > ,
75
- pub ( crate ) clients : Vec < Weak < dyn Waitable > > ,
76
- pub ( crate ) services : Vec < Weak < dyn Waitable > > ,
77
- pub ( crate ) subscriptions : Vec < Weak < dyn Waitable > > ,
75
+ pub ( crate ) clients : Vec < Weak < dyn ClientWaitable > > ,
76
+ pub ( crate ) services : Vec < Weak < dyn ServiceWaitable > > ,
77
+ pub ( crate ) subscriptions : Vec < Weak < dyn SubscriptionWaitable > > ,
78
78
_parameter_map : ParameterOverrideMap ,
79
79
}
80
80
@@ -193,7 +193,7 @@ impl Node {
193
193
{
194
194
let client = Arc :: new ( crate :: node:: client:: Client :: < T > :: new ( self , topic) ?) ;
195
195
self . clients
196
- . push ( Arc :: downgrade ( & client) as Weak < dyn Waitable > ) ;
196
+ . push ( Arc :: downgrade ( & client) as Weak < dyn ClientWaitable > ) ;
197
197
Ok ( client)
198
198
}
199
199
@@ -229,7 +229,7 @@ impl Node {
229
229
self , topic, callback,
230
230
) ?) ;
231
231
self . services
232
- . push ( Arc :: downgrade ( & service) as Weak < dyn Waitable > ) ;
232
+ . push ( Arc :: downgrade ( & service) as Weak < dyn ServiceWaitable > ) ;
233
233
Ok ( service)
234
234
}
235
235
@@ -249,23 +249,23 @@ impl Node {
249
249
{
250
250
let subscription = Arc :: new ( Subscription :: < T > :: new ( self , topic, qos, callback) ?) ;
251
251
self . subscriptions
252
- . push ( Arc :: downgrade ( & subscription) as Weak < dyn Waitable > ) ;
252
+ . push ( Arc :: downgrade ( & subscription) as Weak < dyn SubscriptionWaitable > ) ;
253
253
Ok ( subscription)
254
254
}
255
255
256
256
/// Returns the subscriptions that have not been dropped yet.
257
- pub ( crate ) fn live_subscriptions ( & self ) -> Vec < Arc < dyn Waitable > > {
257
+ pub ( crate ) fn live_subscriptions ( & self ) -> Vec < Arc < dyn SubscriptionWaitable > > {
258
258
self . subscriptions
259
259
. iter ( )
260
260
. filter_map ( Weak :: upgrade)
261
261
. collect ( )
262
262
}
263
263
264
- pub ( crate ) fn live_clients ( & self ) -> Vec < Arc < dyn Waitable > > {
264
+ pub ( crate ) fn live_clients ( & self ) -> Vec < Arc < dyn ClientWaitable > > {
265
265
self . clients . iter ( ) . filter_map ( Weak :: upgrade) . collect ( )
266
266
}
267
267
268
- pub ( crate ) fn live_services ( & self ) -> Vec < Arc < dyn Waitable > > {
268
+ pub ( crate ) fn live_services ( & self ) -> Vec < Arc < dyn ServiceWaitable > > {
269
269
self . services . iter ( ) . filter_map ( Weak :: upgrade) . collect ( )
270
270
}
271
271
0 commit comments