@@ -22,13 +22,12 @@ use futures_util::future::BoxFuture;
22
22
#[ cfg( feature = "deflate" ) ]
23
23
use ratchet:: deflate:: { DeflateConfig , DeflateExtProvider } ;
24
24
use runtime:: {
25
- start_runtime, ClientConfig , DownlinkRuntimeError , RawHandle , RemotePath , Transport ,
26
- WebSocketConfig ,
25
+ start_runtime, ClientConfig , DownlinkRuntimeError , RawHandle , Transport , WebSocketConfig ,
27
26
} ;
28
- pub use runtime:: { CommandError , Commander } ;
27
+ pub use runtime:: { CommandError , Commander , RemotePath } ;
29
28
use std:: sync:: Arc ;
30
- use swimos_api:: downlink:: DownlinkConfig ;
31
- use swimos_downlink:: lifecycle:: {
29
+ pub use swimos_api:: downlink:: DownlinkConfig ;
30
+ pub use swimos_downlink:: lifecycle:: {
32
31
BasicMapDownlinkLifecycle , BasicValueDownlinkLifecycle , MapDownlinkLifecycle ,
33
32
ValueDownlinkLifecycle ,
34
33
} ;
@@ -222,7 +221,7 @@ impl ClientHandle {
222
221
///
223
222
/// # Arguments
224
223
/// * `path` - The path of the downlink top open.
225
- pub fn value_downlink < L , T > (
224
+ pub fn value_downlink < T > (
226
225
& self ,
227
226
path : RemotePath ,
228
227
) -> ValueDownlinkBuilder < ' _ , BasicValueDownlinkLifecycle < T > > {
@@ -240,7 +239,7 @@ impl ClientHandle {
240
239
///
241
240
/// # Arguments
242
241
/// * `path` - The path of the downlink top open.
243
- pub fn map_downlink < L , K , V > (
242
+ pub fn map_downlink < K , V > (
244
243
& self ,
245
244
path : RemotePath ,
246
245
) -> MapDownlinkBuilder < ' _ , BasicMapDownlinkLifecycle < K , V > > {
@@ -287,19 +286,19 @@ impl<'h, L> ValueDownlinkBuilder<'h, L> {
287
286
}
288
287
289
288
/// Sets link options for the downlink.
290
- pub fn options ( & mut self , options : DownlinkOptions ) -> & mut Self {
289
+ pub fn options ( mut self , options : DownlinkOptions ) -> Self {
291
290
self . options = options;
292
291
self
293
292
}
294
293
295
294
/// Sets a new downlink runtime configuration.
296
- pub fn runtime_config ( & mut self , config : DownlinkRuntimeConfig ) -> & mut Self {
295
+ pub fn runtime_config ( mut self , config : DownlinkRuntimeConfig ) -> Self {
297
296
self . runtime_config = config;
298
297
self
299
298
}
300
299
301
300
/// Sets a new downlink configuration.
302
- pub fn downlink_config ( & mut self , config : DownlinkConfig ) -> & mut Self {
301
+ pub fn downlink_config ( mut self , config : DownlinkConfig ) -> Self {
303
302
self . downlink_config = config;
304
303
self
305
304
}
@@ -333,6 +332,7 @@ impl<'h, L> ValueDownlinkBuilder<'h, L> {
333
332
}
334
333
}
335
334
335
+ #[ derive( Debug ) ]
336
336
pub enum ValueDownlinkOperationError {
337
337
NotYetSynced ,
338
338
DownlinkStopped ,
@@ -408,19 +408,19 @@ impl<'h, L> MapDownlinkBuilder<'h, L> {
408
408
}
409
409
410
410
/// Sets link options for the downlink.
411
- pub fn options ( & mut self , options : DownlinkOptions ) -> & mut Self {
411
+ pub fn options ( mut self , options : DownlinkOptions ) -> Self {
412
412
self . options = options;
413
413
self
414
414
}
415
415
416
416
/// Sets a new downlink runtime configuration.
417
- pub fn runtime_config ( & mut self , config : DownlinkRuntimeConfig ) -> & mut Self {
417
+ pub fn runtime_config ( mut self , config : DownlinkRuntimeConfig ) -> Self {
418
418
self . runtime_config = config;
419
419
self
420
420
}
421
421
422
422
/// Sets a new downlink configuration.
423
- pub fn downlink_config ( & mut self , config : DownlinkConfig ) -> & mut Self {
423
+ pub fn downlink_config ( mut self , config : DownlinkConfig ) -> Self {
424
424
self . downlink_config = config;
425
425
self
426
426
}
0 commit comments