Skip to content

Commit 22c5b78

Browse files
committed
Merge branch 'main' of https://github.com/swimos/swim-rust
2 parents 25515e4 + e141d14 commit 22c5b78

File tree

16 files changed

+41
-41
lines changed

16 files changed

+41
-41
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ ratchet = { package = "ratchet_rs", version = "0.4" }
9090
ratchet_fixture = "0.4"
9191
flate2 = "1.0.22"
9292
bitflags = "1.3"
93-
rocksdb = "0.19.0"
93+
rocksdb = "0.22"
9494
integer-encoding = "3.0.4"
9595
rustls = "0.20"
9696
webpki = "0.22"

client/swimos_client/src/lib.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,12 @@ use futures_util::future::BoxFuture;
2222
#[cfg(feature = "deflate")]
2323
use ratchet::deflate::{DeflateConfig, DeflateExtProvider};
2424
use runtime::{
25-
start_runtime, ClientConfig, DownlinkRuntimeError, RawHandle, RemotePath, Transport,
26-
WebSocketConfig,
25+
start_runtime, ClientConfig, DownlinkRuntimeError, RawHandle, Transport, WebSocketConfig,
2726
};
28-
pub use runtime::{CommandError, Commander};
27+
pub use runtime::{CommandError, Commander, RemotePath};
2928
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::{
3231
BasicMapDownlinkLifecycle, BasicValueDownlinkLifecycle, MapDownlinkLifecycle,
3332
ValueDownlinkLifecycle,
3433
};
@@ -222,7 +221,7 @@ impl ClientHandle {
222221
///
223222
/// # Arguments
224223
/// * `path` - The path of the downlink top open.
225-
pub fn value_downlink<L, T>(
224+
pub fn value_downlink<T>(
226225
&self,
227226
path: RemotePath,
228227
) -> ValueDownlinkBuilder<'_, BasicValueDownlinkLifecycle<T>> {
@@ -240,7 +239,7 @@ impl ClientHandle {
240239
///
241240
/// # Arguments
242241
/// * `path` - The path of the downlink top open.
243-
pub fn map_downlink<L, K, V>(
242+
pub fn map_downlink<K, V>(
244243
&self,
245244
path: RemotePath,
246245
) -> MapDownlinkBuilder<'_, BasicMapDownlinkLifecycle<K, V>> {
@@ -287,19 +286,19 @@ impl<'h, L> ValueDownlinkBuilder<'h, L> {
287286
}
288287

289288
/// 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 {
291290
self.options = options;
292291
self
293292
}
294293

295294
/// 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 {
297296
self.runtime_config = config;
298297
self
299298
}
300299

301300
/// 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 {
303302
self.downlink_config = config;
304303
self
305304
}
@@ -333,6 +332,7 @@ impl<'h, L> ValueDownlinkBuilder<'h, L> {
333332
}
334333
}
335334

335+
#[derive(Debug)]
336336
pub enum ValueDownlinkOperationError {
337337
NotYetSynced,
338338
DownlinkStopped,
@@ -408,19 +408,19 @@ impl<'h, L> MapDownlinkBuilder<'h, L> {
408408
}
409409

410410
/// 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 {
412412
self.options = options;
413413
self
414414
}
415415

416416
/// 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 {
418418
self.runtime_config = config;
419419
self
420420
}
421421

422422
/// 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 {
424424
self.downlink_config = config;
425425
self
426426
}

docs/define.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ of time. To achieve this using the derive macro, a tag can be added to the lane
120120
```rust
121121
#[derive(AgentLaneModel)]
122122
struct ExampleAgent {
123-
#[lane(transient)]
123+
#[item(transient)]
124124
value_lane: ValueLane<i32>,
125125
map_lane: MapLane<String, u64>,
126126
}

example_apps/map_lane_persistence/src/agent.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use swimos::agent::{
2424
#[projections]
2525
pub struct ExampleAgent {
2626
map: MapLane<String, i32>,
27-
#[lane(transient)]
27+
#[item(transient)]
2828
temporary: MapLane<String, i32>,
2929
stop: CommandLane<()>,
3030
}

example_apps/map_store/src/agent.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use crate::model::Instruction;
2727
#[projections]
2828
pub struct ExampleAgent {
2929
lane: ValueLane<i32>,
30-
#[lane(transient)]
30+
#[item(transient)]
3131
saved: MapStore<String, i32>,
3232
command: CommandLane<Instruction>,
3333
}

example_apps/map_store_persistence/src/agent.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use crate::model::Instruction;
2828
#[projections]
2929
pub struct ExampleAgent {
3030
value: MapStore<String, i32>,
31-
#[lane(transient)]
31+
#[item(transient)]
3232
temporary: MapStore<String, i32>,
3333
instructions: CommandLane<Instruction>,
3434
}

example_apps/tutorial_app/src/unit_agent.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ use tutorial_app_model::{Counter, HistoryItem, Message};
3131
pub struct UnitAgent {
3232
publish: CommandLane<Message>,
3333
history: MapLane<usize, HistoryItem>,
34-
#[lane(transient)]
34+
#[item(transient)]
3535
histogram: MapLane<i64, Counter>,
3636
latest: ValueLane<Option<Message>>,
3737
}

example_apps/value_lane_persistence/src/agent.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use swimos::agent::{
2323
#[projections]
2424
pub struct ExampleAgent {
2525
value: ValueLane<i32>,
26-
#[lane(transient)]
26+
#[item(transient)]
2727
temporary: ValueLane<i32>,
2828
stop: CommandLane<()>,
2929
}

example_apps/value_store/src/agent.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use crate::model::Instruction;
2727
#[projections]
2828
pub struct ExampleAgent {
2929
lane: ValueLane<i32>,
30-
#[lane(transient)]
30+
#[item(transient)]
3131
saved: ValueStore<i32>,
3232
command: CommandLane<Instruction>,
3333
}

example_apps/value_store_persistence/src/agent.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use crate::model::Instruction;
2727
#[projections]
2828
pub struct ExampleAgent {
2929
value: ValueStore<i32>,
30-
#[lane(transient)]
30+
#[item(transient)]
3131
temporary: ValueStore<i32>,
3232
instructions: CommandLane<Instruction>,
3333
}

0 commit comments

Comments
 (0)