Skip to content

Commit 18ce1ae

Browse files
authored
Merge branch 'main' into client_tidyup
2 parents 5eb6d59 + 1c124c0 commit 18ce1ae

File tree

14 files changed

+27
-27
lines changed

14 files changed

+27
-27
lines changed

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
}

server/swimos_agent_derive/src/lane_model_derive/model.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,15 +356,15 @@ const SUPPLY_LANE_NAME: &str = "SupplyLane";
356356
const HTTP_LANE_NAME: &str = "HttpLane";
357357
const SIMPLE_HTTP_LANE_NAME: &str = "SimpleHttpLane";
358358

359-
const LANE_TAG: &str = "lane";
359+
const ITEM_TAG: &str = "item";
360360

361361
fn extract_lane_model(field: &Field) -> Validation<ItemModel<'_>, Errors<syn::Error>> {
362362
if let (Some(fld_name), Type::Path(TypePath { qself: None, path })) = (&field.ident, &field.ty)
363363
{
364364
if let Some(PathSegment { ident, arguments }) = path.segments.last() {
365365
let type_name = ident.to_string();
366366
let (item_attrs, errors) =
367-
consume_attributes(LANE_TAG, &field.attrs, make_item_attr_consumer());
367+
consume_attributes(ITEM_TAG, &field.attrs, make_item_attr_consumer());
368368
let modifiers = Validation::Validated(item_attrs, Errors::from(errors))
369369
.and_then(|item_attrs| combine_item_attrs(field, item_attrs));
370370

server/swimos_agent_derive/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ fn default_root() -> syn::Path {
3232

3333
const AGENT_TAG: &str = "agent";
3434

35-
#[proc_macro_derive(AgentLaneModel, attributes(agent, lane))]
35+
#[proc_macro_derive(AgentLaneModel, attributes(agent, item))]
3636
pub fn derive_agent_lane_model(input: TokenStream) -> TokenStream {
3737
let input = parse_macro_input!(input as DeriveInput);
3838
let (item_attrs, errors) =

0 commit comments

Comments
 (0)