Skip to content

Commit 282efeb

Browse files
committed
Updated agent documentation.
1 parent c7aae3e commit 282efeb

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

swimos/src/agent.rs

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,16 @@ pub use swimos_agent_derive::AgentLaneModel;
142142
/// 3. [Map Lanes](`lanes::MapLane`)
143143
/// 4. [Join-Value Lanes](`lanes::JoinValueLane`)
144144
/// 5. [Join-Map Lanes](`lanes::JoinMapLane`)
145-
/// 6. [HTTP Lanes](`lanes::HttpLane`) (or [Simple HTTP Lanes](`lanes::SimpleHttpLane`))
145+
/// 6. [Demand Lanes](`lanes::DemandLane`)
146+
/// 7. [Demand-Map Lanes](`lanes::DemandMapLane`)
147+
/// 8. [Supply Lanes](`lanes::SupplyLane`)
148+
/// 9. [HTTP Lanes](`lanes::HttpLane`) (or [Simple HTTP Lanes](`lanes::SimpleHttpLane`))
146149
///
147-
/// For [Value Lanes](`lanes::ValueLane`) and [Map Lanes](`lanes::CommandLane`), the type parameter
148-
/// must implement the [`swimos_form::Form`] trait (used for serialization and deserialization). For
149-
/// [Map Lanes](`lanes::MapLane`), [Join-Value Lanes](`lanes::JoinValueLane`) and [Join-Map Lanes](`lanes::JoinMapLane`),
150-
/// both parameters must implement [`swimos_form::Form`] and additionally, the key type `K` must additionally
151-
/// satisfy `K: Hash + Eq + Ord + Clone`.
150+
/// For [Value Lanes](`lanes::ValueLane`), [Command Lanes](`lanes::CommandLane`), [Demand Lanes](`lanes::DemandLane`) and
151+
/// [Supply Lanes](`lanes::SupplyLane`), the type parameter must implement the [`swimos_form::Form`] trait (used for serialization
152+
/// and deserialization). For [Map Lanes](`lanes::MapLane`), [Demand-Map Lanes](`lanes::MapLane`),
153+
/// [Join-Value Lanes](`lanes::JoinValueLane`) and [Join-Map Lanes](`lanes::JoinMapLane`), both parameters must implement
154+
/// [`swimos_form::Form`] and additionally, the key type `K` must additionally satisfy `K: Hash + Eq + Ord + Clone`.
152155
///
153156
/// Additionally, for [Join-Map Lanes](`lanes::JoinMapLane`), the link key type `L` must satisfy`L: Hash + Eq + Clone`.
154157
///
@@ -163,8 +166,8 @@ pub use swimos_agent_derive::AgentLaneModel;
163166
/// codec that is selected for the lane (using the appropriate type parameter). By default, this is the
164167
/// [Default Codec](`lanes::http::DefaultCodec`). This codec always requires that type parameters implement
165168
/// [`swimos_form::Form`] and, if the `json` feature is active, that they are Serde serializable.
166-
/// [`crate::agent::lanes::http::DefaultCodec`].
167-
///
169+
/// [`crate::agent::lanes::http::DefaultCodec`].
170+
///
168171
/// The supported store types are:
169172
///
170173
/// 1. [`crate::agent::stores::ValueStore`]
@@ -176,14 +179,21 @@ pub use swimos_agent_derive::AgentLaneModel;
176179
///
177180
/// ```no_run
178181
/// use swimos::agent::AgentLaneModel;
179-
/// use swimos::agent::lanes::{ValueLane, CommandLane, MapLane, JoinValueLane, JoinMapLane, SimpleHttpLane};
182+
/// use swimos::agent::lanes::{
183+
/// ValueLane, CommandLane, DemandLane,
184+
/// DemandMapLane, MapLane, JoinValueLane,
185+
/// JoinMapLane, SimpleHttpLane, SupplyLane
186+
/// };
180187
/// use swimos::agent::stores::{ValueStore, MapStore};
181188
///
182189
/// #[derive(AgentLaneModel)]
183190
/// struct ExampleAgent {
184191
/// value_lane: ValueLane<i32>,
185192
/// command_lane: CommandLane<String>,
193+
/// demand_lane: DemandLane<String>,
194+
/// supply_lane: SupplyLane<i32>,
186195
/// map_lane: MapLane<String, i64>,
196+
/// demand_map_lane: DemandMapLane<i32, i32>,
187197
/// value_store: ValueStore<i32>,
188198
/// map_store: MapStore<String, i64>,
189199
/// join_value: JoinValueLane<String, i64>,

0 commit comments

Comments
 (0)