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 Supervisor’s fleet. Slots are contiguous per variant (slot = nonce; rest-for-one’s birth order is the declaration order).

Structs§

ActionReducer
A left fold over Bombay actions.
Actions
Bombay’s typed realization of the actor transition effects: communications, fresh actor creation, and next behavior or termination.
BehaviorFn
A concrete behavior defined by initialization and user-event folds.
Births
This behavior may emit births of C.
ChildStopped
Compose
Create
A staged request to establish a fresh child at a creator-local nonce.
CreationResolved
The committed result of one staged crate::Create request.
Deadline
DeadlineSends
Named effect lanes added by Deadline.
Delivery
One statically typed send operation.
Effects
The accumulated observable effects of a transition prefix.
FinalizeOnShutdown
Run one explicit final fold and then stop normally.
FoldFn
Folded
The result of folding initialization and an event stream.
Inner
A lane reached through the product’s composed behavior sends.
Machine
MailAddr
NoBirths
This behavior cannot emit child births.
ObserveChild
Ask the local interpreter to observe the exact child generation bound at nonce.
ObserveCreation
Ask the local interpreter to return the committed result of the same-action creation at nonce through the behavior’s CreationEvent lane.
ObservePeer
Ask the local interpreter to observe the exact peer incarnation selected at peer when this request is interpreted.
PeerStopped
Proxy
A stable actor that serializes fresh worker-incarnation installation.
ProxySends
The concrete, statically dispatched effect lanes emitted by a Proxy.
Pure
ReceiveTimeout
A pure one-notification-per-idle-period receive timeout.
ReceiveTimeoutSends
Named effect lanes added by ReceiveTimeout.
Recipient
A recipient statically coupled to the message it accepts.
ReportWorkerCreationResolved
Ask a proxy’s interpreter to report a worker creation result to its parent. The interpreter supplies the emitting proxy’s nonce.
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.
Stash
StopOnShutdown
Stop normally when the shutdown lane is received.
SupervisionFailure
A typed failure of the supervisor’s child-topology contract.
Supervisor
SupervisorSends
Named effect lanes emitted by a supervised behavior.
TimerElapsed
TimerGeneration
TimerId
Transcript
UnwatchPeer
Ask the local interpreter to cancel this actor’s observation of peer.
User
The user-message event at the Agha floor.
Watch
A pure peer-observation transformation.
WatchSends
Named effect lanes added by Watch.
WorkerCreationResolved
A worker creation result reported by a still-live supervised proxy.
WorkerStopped
A worker termination reported by a still-live supervised proxy.

Enums§

Crash
Why actor execution terminated abnormally.
CreationKind
Behavior-owned provenance for a staged fresh actor creation request.
CreationRejection
Why a staged fresh creation was not committed by an interpreter.
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.
IncarnationPhase
A copyable observation of the lifecycle without owned child specifications.
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.
Own
The lane owned by the current named send product.
ProxyCommand
Commands accepted by a stable proxy.
ProxyEvent
ReceiveTimeoutError
A controlled receive-timeout failure.
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.
TimedEvent
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
CreationEvent
EventInput
A statically proven injection of one semantic input into a concrete event sum.
Handler
PeerEvent
SendAlgebra
The operation required to accumulate sends across transitions.
SendInput
Static evidence that a send algebra contains one request lane.
ShutdownEvent
TimeEvent
UserEvent
Construction/extraction of the user lane through a composed event type.
WorkerCreationEvent
WorkerEvent

Functions§

fold_events
Initialize a behavior and left-fold events until exhaustion, controlled failure, or the first stop verdict.
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
Become
BehaviorActed
The only successful effect shape admitted by a Behavior implementation.
DeadlineActions
DeadlineEvent
DeadlineReaction
LinkReaction
ProxyActions
ReceiveTimeoutActions
ReceiveTimeoutEvent
ReceiveTimeoutReaction
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.
SupervisorActions