Skip to main content

Crate behavior

Crate behavior 

Source
Expand description

Pure, typed actor-behavior primitives. A Behavior folds its associated event protocol into exactly Actions: sends, fresh creations, and its next behavior or termination. Higher capabilities are composed from these explicit transition parts.

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
Bombay’s typed realization of the actor transition effects: communications, fresh actor creation, and next behavior or termination.
At
Base
Births
This behavior may emit births of C.
ChildStopped
Create
A staged request to establish a fresh child at a creator-local nonce.
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.
ReceiveTimeout
A pure one-notification-per-idle-period receive timeout.
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.
ScheduleAfter
Request scheduling relative to the interpreter’s clock.
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
SupervisionFailure
A typed failure of the supervisor’s child-topology contract.
TimerElapsed
TimerGeneration
TimerId
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.
CreationKind
Behavior-owned provenance for a staged fresh actor creation request.
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.
ReceiveTimeoutError
A controlled receive-timeout failure.
ReceiveTimeoutEvent
RestartDenial
Why an otherwise eligible replacement set was denied.
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
SupervisionFailureReason
Why a supervisor could no longer preserve its child topology.
WatchEvent

Traits§

Address
A pure actor-address namespace.
Behavior
A composed pure behavior. Event is the complete accepted protocol; every successful transition returns the declared Actions value.
BirthMode
A type-level description of a behavior’s creation capability.
ChildEvent
PeerEvent
SendAlgebra
The operation required to accumulate sends across transitions.
ShutdownEvent
State
TimeEvent
UserEvent
Construction/extraction of the user lane through a composed event type.
WorkerEvent

Functions§

restart_all
restart_one
restart_rest
retire_on_supervision_failure
Retire the failed slot and keep the supervisor alive.
run
Drive user-lane messages through a complete behavior protocol.
stop_on_abnormal_death
Stop when the monitor reports an abnormal outcome.
stop_on_supervision_failure
Stop the supervisor with a typed failure outcome.

Type Aliases§

Acted
AtActions
AtReaction
AtSends
Become
BehaviorActed
The only successful effect shape admitted by a Behavior implementation.
LinkReaction
ReceiveTimeoutActions
ReceiveTimeoutReaction
ReceiveTimeoutSends
ShutdownReaction
A final shutdown fold. Its sends and fresh creations are retained, while its become verdict is replaced with Stop(Normal).
SupervisionFailureReaction
Pure policy applied when a supervisor cannot preserve its child topology.