This guide will tell you how to define your own Swim agents using the Rust API. It assumes that you are already familiar with the basic building blocks of a Swim application including:
- Agents
- Lanes
- Downlinks
If you don't know what any of these are, you should consult a more general guide first.
- Defining Agents
- The
AgentLaneModel
trait. - Writing agent types.
- The
Form
trait. - Persistence of lane state.
- Private stores.
- The
- Event Handlers
- The
HandlerAction
andEventHandler
traits. - How event handlers are executed.
- The
HandlerContext
. - Handler combinators.
- Suspending futures.
- Unifying
EventHandler
types.
- The
- Agent Lifecycles
- The
AgentLifecycle
trait. - Attribute macro to generate agent lifecycles.
- Agent lifecycle events.
CommandLane
events.DemandLane
events.DemandMapLane
events.ValueLane
events.MapLane
events.JoinValueLane
events.JoinMapLane
events.HttpLane
events.- Store events.
- Borrowing from lifecycles.
- Interior mutability in lifecycles.
- The
- Downlinks
- Downlink lifecycles.
- Building a stateless downlink.
- Building a stateful downlink.
- Opening a downlink.
- How downlinks run.
- Agents from Scratch
- TODO
- Advanced Use of Form Derivation
- TODO