@@ -9,13 +9,17 @@ use glib::translate::{from_glib_borrow, from_glib_full, Borrowed, IntoGlib as _,
9
9
use std:: future:: Future ;
10
10
use std:: pin:: Pin ;
11
11
12
- type DBusProxyTypeFn =
13
- Box < dyn Fn ( & DBusObjectManagerClient , & str , Option < & str > ) -> glib:: types:: Type + ' static > ;
12
+ type DBusProxyTypeFn = Box <
13
+ dyn Fn ( & DBusObjectManagerClient , & str , Option < & str > ) -> glib:: types:: Type
14
+ + Send
15
+ + Sync
16
+ + ' static ,
17
+ > ;
14
18
15
19
impl DBusObjectManagerClient {
16
20
#[ doc( alias = "g_dbus_object_manager_client_new" ) ]
17
21
#[ allow( clippy:: new_ret_no_self) ]
18
- pub fn new < P : FnOnce ( Result < DBusObjectManagerClient , glib:: Error > ) + ' static > (
22
+ pub fn new < P : FnOnce ( Result < DBusObjectManagerClient , glib:: Error > ) + Send + Sync + ' static > (
19
23
connection : & DBusConnection ,
20
24
flags : DBusObjectManagerClientFlags ,
21
25
name : & str ,
@@ -61,7 +65,7 @@ impl DBusObjectManagerClient {
61
65
}
62
66
63
67
unsafe extern "C" fn new_trampoline <
64
- P : FnOnce ( Result < DBusObjectManagerClient , glib:: Error > ) + ' static ,
68
+ P : FnOnce ( Result < DBusObjectManagerClient , glib:: Error > ) + Send + Sync + ' static ,
65
69
> (
66
70
_source_object : * mut glib:: gobject_ffi:: GObject ,
67
71
res : * mut crate :: ffi:: GAsyncResult ,
@@ -139,7 +143,9 @@ impl DBusObjectManagerClient {
139
143
140
144
#[ doc( alias = "g_dbus_object_manager_client_new_for_bus" ) ]
141
145
#[ allow( clippy:: new_ret_no_self) ]
142
- pub fn new_for_bus < P : FnOnce ( Result < DBusObjectManagerClient , glib:: Error > ) + ' static > (
146
+ pub fn new_for_bus <
147
+ P : FnOnce ( Result < DBusObjectManagerClient , glib:: Error > ) + Send + Sync + ' static ,
148
+ > (
143
149
bus_type : BusType ,
144
150
flags : DBusObjectManagerClientFlags ,
145
151
name : & str ,
@@ -185,7 +191,7 @@ impl DBusObjectManagerClient {
185
191
}
186
192
187
193
unsafe extern "C" fn new_for_bus_trampoline <
188
- P : FnOnce ( Result < DBusObjectManagerClient , glib:: Error > ) + ' static ,
194
+ P : FnOnce ( Result < DBusObjectManagerClient , glib:: Error > ) + Send + Sync + ' static ,
189
195
> (
190
196
_source_object : * mut glib:: gobject_ffi:: GObject ,
191
197
res : * mut crate :: ffi:: GAsyncResult ,
@@ -269,7 +275,10 @@ impl DBusObjectManagerClient {
269
275
object_path : & str ,
270
276
get_proxy_type_func : Option <
271
277
Box <
272
- dyn Fn ( & DBusObjectManagerClient , & str , Option < & str > ) -> glib:: types:: Type + ' static ,
278
+ dyn Fn ( & DBusObjectManagerClient , & str , Option < & str > ) -> glib:: types:: Type
279
+ + Send
280
+ + Sync
281
+ + ' static ,
273
282
> ,
274
283
> ,
275
284
cancellable : Option < & impl IsA < Cancellable > > ,
@@ -278,6 +287,8 @@ impl DBusObjectManagerClient {
278
287
Option <
279
288
Box <
280
289
dyn Fn ( & DBusObjectManagerClient , & str , Option < & str > ) -> glib:: types:: Type
290
+ + Send
291
+ + Sync
281
292
+ ' static ,
282
293
> ,
283
294
> ,
@@ -294,6 +305,8 @@ impl DBusObjectManagerClient {
294
305
let callback = & * ( data as * mut Option <
295
306
Box <
296
307
dyn Fn ( & DBusObjectManagerClient , & str , Option < & str > ) -> glib:: types:: Type
308
+ + Send
309
+ + Sync
297
310
+ ' static ,
298
311
> ,
299
312
> ) ;
@@ -318,6 +331,8 @@ impl DBusObjectManagerClient {
318
331
data as * mut Option <
319
332
Box <
320
333
dyn Fn ( & DBusObjectManagerClient , & str , Option < & str > ) -> glib:: types:: Type
334
+ + Send
335
+ + Sync
321
336
+ ' static ,
322
337
> ,
323
338
> ,
@@ -328,6 +343,8 @@ impl DBusObjectManagerClient {
328
343
Option <
329
344
Box <
330
345
dyn Fn ( & DBusObjectManagerClient , & str , Option < & str > ) -> glib:: types:: Type
346
+ + Send
347
+ + Sync
331
348
+ ' static ,
332
349
> ,
333
350
> ,
@@ -361,7 +378,10 @@ impl DBusObjectManagerClient {
361
378
object_path : & str ,
362
379
get_proxy_type_func : Option <
363
380
Box <
364
- dyn Fn ( & DBusObjectManagerClient , & str , Option < & str > ) -> glib:: types:: Type + ' static ,
381
+ dyn Fn ( & DBusObjectManagerClient , & str , Option < & str > ) -> glib:: types:: Type
382
+ + Send
383
+ + Sync
384
+ + ' static ,
365
385
> ,
366
386
> ,
367
387
cancellable : Option < & impl IsA < Cancellable > > ,
@@ -370,6 +390,8 @@ impl DBusObjectManagerClient {
370
390
Option <
371
391
Box <
372
392
dyn Fn ( & DBusObjectManagerClient , & str , Option < & str > ) -> glib:: types:: Type
393
+ + Send
394
+ + Sync
373
395
+ ' static ,
374
396
> ,
375
397
> ,
@@ -386,6 +408,8 @@ impl DBusObjectManagerClient {
386
408
let callback = & * ( data as * mut Option <
387
409
Box <
388
410
dyn Fn ( & DBusObjectManagerClient , & str , Option < & str > ) -> glib:: types:: Type
411
+ + Send
412
+ + Sync
389
413
+ ' static ,
390
414
> ,
391
415
> ) ;
@@ -410,6 +434,8 @@ impl DBusObjectManagerClient {
410
434
data as * mut Option <
411
435
Box <
412
436
dyn Fn ( & DBusObjectManagerClient , & str , Option < & str > ) -> glib:: types:: Type
437
+ + Send
438
+ + Sync
413
439
+ ' static ,
414
440
> ,
415
441
> ,
@@ -420,6 +446,8 @@ impl DBusObjectManagerClient {
420
446
Option <
421
447
Box <
422
448
dyn Fn ( & DBusObjectManagerClient , & str , Option < & str > ) -> glib:: types:: Type
449
+ + Send
450
+ + Sync
423
451
+ ' static ,
424
452
> ,
425
453
> ,
0 commit comments