Skip to main content

Crate behavior

Crate behavior 

Source
Expand description

Pure actor algebra. A Behavior folds its associated event protocol into exactly Actions: sends, creates, and become. Timing, observation, supervision, stashing, and finite-state behavior are derived compositions.

Macros§

workers
workers![(4, WorkerA, build_a), (2, WorkerB, build_b)] → a block declaring the Crew sum and yielding (total, crew_build) for Supervising’s fleet. Slots are contiguous per variant (slot = nonce; rest-for-one’s birth order is the declaration order).

Structs§

Actions
Exactly Agha’s effect triple, with a Bombay interpretation-order policy.
At
AtGeneration
AtId
Base
Births
This behavior may emit births of C.
ChildStopped
Create
Fresh actor creation. Replacement at an existing address is deliberately absent; stable restart is derived with a proxy actor.
Delivery
One statically typed send operation.
FinalizeOnShutdown
Run one explicit final fold and then stop normally.
FnState
Fsm
MailAddr
NoBirths
This behavior cannot emit child births.
ObserveChild
ObservePeer
PeerStopped
Proxy
The stable actor. Every replacement is an ordinary fresh birth beneath it.
Recipient
A recipient statically coupled to the message it accepts.
ReportWorkerStopped
A proxy’s request for its interpreter to report a worker termination to the proxy’s parent. The interpreter supplies the emitting proxy’s child nonce when constructing WorkerStopped.
ScheduleAt
SendProduct
A product of independently typed send protocols.
ServiceSends
Requests interpreted by the runtime local to the emitting actor.
ShutdownRequested
A request to finish through one serialized behavior transition.
Spec
Stashing
StopOnShutdown
Stop normally when the shutdown lane is received.
Supervising
TimeReached
Transcript
User
The user-message event at the Agha floor.
Watching
WorkerStopped
A worker termination reported by a still-live supervised proxy.

Enums§

AtEvent
Crash
Why actor execution terminated abnormally.
Exit
How a fold ends. The R parameter of the become verdict (Step<Ph, Exit>): a Stop carries one of these; the driver also mints Collected when the mailbox drains with no self-stop.
Move
Never
The uninhabited type with two structural jobs. As a phase menu, Step<Never> has no constructible Goto — a plain actor is a one-phase machine. As an outbound/offspring menu, it proves a layer sends or creates nothing. The law is the type, not a convention.
ProxyCommand
Commands accepted by a stable proxy.
RestartPolicy
Route
An address expression for ordinary actor delivery.
ShutdownProtocol
The complete protocol of a behavior that supports graceful shutdown.
StashRoute
Step
The become verdict (Agha 1986): what replaces the current behavior as it processes one event.
Strategy
SupervisionEvent
WatchEvent

Traits§

Address
A pure actor-address namespace.
Behavior
A composed pure behavior. Event is the complete accepted protocol; successful transitions always return the same Agha effect algebra.
BirthMode
A type-level description of the creation leg of the actor algebra.
ChildEvent
PeerEvent
SendAlgebra
The monoid required to accumulate sends across transitions.
ShutdownEvent
Construction of the shutdown lane through a composed event type.
State
TimeEvent
UserEvent
Construction/extraction of the user lane through a composed event type.
WorkerEvent
Construction of the worker-report lane through a composed event type.

Functions§

restart_all
restart_one
restart_rest
run
Drive user-lane messages through a complete behavior protocol.
stop_on_abnormal_death
Stop when the monitor reports an abnormal outcome.

Type Aliases§

Acted
AtReaction
Become
LinkReaction
ShutdownReaction
A final shutdown fold. Its sends and fresh creations are retained, while its become verdict is replaced with Stop(Normal).