@@ -104,14 +104,17 @@ impl<T, F> Drop for SourceFuture<T, F> {
104
104
/// Create a `Future` that will resolve after the given number of milliseconds.
105
105
///
106
106
/// The `Future` must be spawned on an `Executor` backed by a `glib::MainContext`.
107
- pub fn timeout_future ( value : u32 ) -> Box < Future < Output = ( ) > + std:: marker:: Unpin + Send > {
107
+ pub fn timeout_future ( value : u32 ) -> Box < dyn Future < Output = ( ) > + std:: marker:: Unpin + Send > {
108
108
timeout_future_with_priority ( :: PRIORITY_DEFAULT , value)
109
109
}
110
110
111
111
/// Create a `Future` that will resolve after the given number of milliseconds.
112
112
///
113
113
/// The `Future` must be spawned on an `Executor` backed by a `glib::MainContext`.
114
- pub fn timeout_future_with_priority ( priority : Priority , value : u32 ) -> Box < Future < Output = ( ) > + std:: marker:: Unpin + Send > {
114
+ pub fn timeout_future_with_priority (
115
+ priority : Priority ,
116
+ value : u32 ,
117
+ ) -> Box < dyn Future < Output = ( ) > + std:: marker:: Unpin + Send > {
115
118
Box :: new ( SourceFuture :: new ( move |send| {
116
119
let mut send = Some ( send) ;
117
120
:: timeout_source_new ( value, None , priority, move || {
@@ -124,7 +127,9 @@ pub fn timeout_future_with_priority(priority: Priority, value: u32) -> Box<Futur
124
127
/// Create a `Future` that will resolve after the given number of seconds.
125
128
///
126
129
/// The `Future` must be spawned on an `Executor` backed by a `glib::MainContext`.
127
- pub fn timeout_future_seconds ( value : u32 ) -> Box < Future < Output = ( ) > + std:: marker:: Unpin + Send > {
130
+ pub fn timeout_future_seconds (
131
+ value : u32 ,
132
+ ) -> Box < dyn Future < Output = ( ) > + std:: marker:: Unpin + Send > {
128
133
timeout_future_seconds_with_priority ( :: PRIORITY_DEFAULT , value)
129
134
}
130
135
@@ -134,7 +139,7 @@ pub fn timeout_future_seconds(value: u32) -> Box<Future<Output = ()> + std::mark
134
139
pub fn timeout_future_seconds_with_priority (
135
140
priority : Priority ,
136
141
value : u32 ,
137
- ) -> Box < Future < Output = ( ) > + std:: marker:: Unpin + Send > {
142
+ ) -> Box < dyn Future < Output = ( ) > + std:: marker:: Unpin + Send > {
138
143
Box :: new ( SourceFuture :: new ( move |send| {
139
144
let mut send = Some ( send) ;
140
145
:: timeout_source_new_seconds ( value, None , priority, move || {
@@ -149,7 +154,9 @@ pub fn timeout_future_seconds_with_priority(
149
154
/// The `Future` will resolve to the pid of the child process and the exit code.
150
155
///
151
156
/// The `Future` must be spawned on an `Executor` backed by a `glib::MainContext`.
152
- pub fn child_watch_future ( pid : :: Pid ) -> Box < Future < Output = ( :: Pid , i32 ) > + std:: marker:: Unpin + Send > {
157
+ pub fn child_watch_future (
158
+ pid : :: Pid ,
159
+ ) -> Box < dyn Future < Output = ( :: Pid , i32 ) > + std:: marker:: Unpin + Send > {
153
160
child_watch_future_with_priority ( :: PRIORITY_DEFAULT , pid)
154
161
}
155
162
@@ -161,7 +168,7 @@ pub fn child_watch_future(pid: ::Pid) -> Box<Future<Output = (::Pid, i32)> + std
161
168
pub fn child_watch_future_with_priority (
162
169
priority : Priority ,
163
170
pid : :: Pid ,
164
- ) -> Box < Future < Output = ( :: Pid , i32 ) > + std:: marker:: Unpin + Send > {
171
+ ) -> Box < dyn Future < Output = ( :: Pid , i32 ) > + std:: marker:: Unpin + Send > {
165
172
Box :: new ( SourceFuture :: new ( move |send| {
166
173
let mut send = Some ( send) ;
167
174
:: child_watch_source_new ( pid, None , priority, move |pid, code| {
@@ -174,15 +181,18 @@ pub fn child_watch_future_with_priority(
174
181
/// Create a `Future` that will resolve once the given UNIX signal is raised
175
182
///
176
183
/// The `Future` must be spawned on an `Executor` backed by a `glib::MainContext`.
177
- pub fn unix_signal_future ( signum : i32 ) -> Box < Future < Output = ( ) > + std:: marker:: Unpin + Send > {
184
+ pub fn unix_signal_future ( signum : i32 ) -> Box < dyn Future < Output = ( ) > + std:: marker:: Unpin + Send > {
178
185
unix_signal_future_with_priority ( :: PRIORITY_DEFAULT , signum)
179
186
}
180
187
181
188
#[ cfg( any( unix, feature = "dox" ) ) ]
182
189
/// Create a `Future` that will resolve once the given UNIX signal is raised
183
190
///
184
191
/// The `Future` must be spawned on an `Executor` backed by a `glib::MainContext`.
185
- pub fn unix_signal_future_with_priority ( priority : Priority , signum : i32 ) -> Box < Future < Output = ( ) > + std:: marker:: Unpin + Send > {
192
+ pub fn unix_signal_future_with_priority (
193
+ priority : Priority ,
194
+ signum : i32 ,
195
+ ) -> Box < dyn Future < Output = ( ) > + std:: marker:: Unpin + Send > {
186
196
Box :: new ( SourceFuture :: new ( move |send| {
187
197
let mut send = Some ( send) ;
188
198
:: unix_signal_source_new ( signum, None , priority, move || {
@@ -283,14 +293,17 @@ impl<T, F> Drop for SourceStream<T, F> {
283
293
/// Create a `Stream` that will provide a value every given number of milliseconds.
284
294
///
285
295
/// The `Future` must be spawned on an `Executor` backed by a `glib::MainContext`.
286
- pub fn interval_stream ( value : u32 ) -> Box < Stream < Item = ( ) > + std:: marker:: Unpin + Send > {
296
+ pub fn interval_stream ( value : u32 ) -> Box < dyn Stream < Item = ( ) > + std:: marker:: Unpin + Send > {
287
297
interval_stream_with_priority ( :: PRIORITY_DEFAULT , value)
288
298
}
289
299
290
300
/// Create a `Stream` that will provide a value every given number of milliseconds.
291
301
///
292
302
/// The `Future` must be spawned on an `Executor` backed by a `glib::MainContext`.
293
- pub fn interval_stream_with_priority ( priority : Priority , value : u32 ) -> Box < Stream < Item = ( ) > + std:: marker:: Unpin + Send > {
303
+ pub fn interval_stream_with_priority (
304
+ priority : Priority ,
305
+ value : u32 ,
306
+ ) -> Box < dyn Stream < Item = ( ) > + std:: marker:: Unpin + Send > {
294
307
Box :: new ( SourceStream :: new ( move |send| {
295
308
:: timeout_source_new ( value, None , priority, move || {
296
309
if send. unbounded_send ( ( ) ) . is_err ( ) {
@@ -305,7 +318,9 @@ pub fn interval_stream_with_priority(priority: Priority, value: u32) -> Box<Stre
305
318
/// Create a `Stream` that will provide a value every given number of seconds.
306
319
///
307
320
/// The `Stream` must be spawned on an `Executor` backed by a `glib::MainContext`.
308
- pub fn interval_stream_seconds ( value : u32 ) -> Box < Stream < Item = ( ) > + std:: marker:: Unpin + Send > {
321
+ pub fn interval_stream_seconds (
322
+ value : u32 ,
323
+ ) -> Box < dyn Stream < Item = ( ) > + std:: marker:: Unpin + Send > {
309
324
interval_stream_seconds_with_priority ( :: PRIORITY_DEFAULT , value)
310
325
}
311
326
@@ -315,7 +330,7 @@ pub fn interval_stream_seconds(value: u32) -> Box<Stream<Item = ()> + std::marke
315
330
pub fn interval_stream_seconds_with_priority (
316
331
priority : Priority ,
317
332
value : u32 ,
318
- ) -> Box < Stream < Item = ( ) > + std:: marker:: Unpin + Send > {
333
+ ) -> Box < dyn Stream < Item = ( ) > + std:: marker:: Unpin + Send > {
319
334
Box :: new ( SourceStream :: new ( move |send| {
320
335
:: timeout_source_new_seconds ( value, None , priority, move || {
321
336
if send. unbounded_send ( ( ) ) . is_err ( ) {
@@ -331,15 +346,18 @@ pub fn interval_stream_seconds_with_priority(
331
346
/// Create a `Stream` that will provide a value whenever the given UNIX signal is raised
332
347
///
333
348
/// The `Stream` must be spawned on an `Executor` backed by a `glib::MainContext`.
334
- pub fn unix_signal_stream ( signum : i32 ) -> Box < Stream < Item = ( ) > + std:: marker:: Unpin + Send > {
349
+ pub fn unix_signal_stream ( signum : i32 ) -> Box < dyn Stream < Item = ( ) > + std:: marker:: Unpin + Send > {
335
350
unix_signal_stream_with_priority ( :: PRIORITY_DEFAULT , signum)
336
351
}
337
352
338
353
#[ cfg( any( unix, feature = "dox" ) ) ]
339
354
/// Create a `Stream` that will provide a value whenever the given UNIX signal is raised
340
355
///
341
356
/// The `Stream` must be spawned on an `Executor` backed by a `glib::MainContext`.
342
- pub fn unix_signal_stream_with_priority ( priority : Priority , signum : i32 ) -> Box < Stream < Item = ( ) > + std:: marker:: Unpin + Send > {
357
+ pub fn unix_signal_stream_with_priority (
358
+ priority : Priority ,
359
+ signum : i32 ,
360
+ ) -> Box < dyn Stream < Item = ( ) > + std:: marker:: Unpin + Send > {
343
361
Box :: new ( SourceStream :: new ( move |send| {
344
362
:: unix_signal_source_new ( signum, None , priority, move || {
345
363
if send. unbounded_send ( ( ) ) . is_err ( ) {
0 commit comments