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.
AssignmentId
Pool-owned correlation token for one exact dispatch attempt.
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 pure communication addressed to a concrete behavior protocol.
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.
JobId
Caller-chosen identity used to correlate pool responses.
KeyedWorkerPool
A worker pool whose admitted keys remain bound to stable worker slots.
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
PoolAssignment
One assignment accepted by a worker behavior.
PoolBehaviorSends
Named pool-owned delivery lanes.
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
Pure routing intent for one concrete destination behavior protocol.
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.
WorkerPool
A fixed, homogeneous, bounded FIFO worker pool.
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.
InterruptionPolicy
Bombay policy for an assigned job whose worker incarnation stops.
KeyedPoolMessage
Messages accepted by a key-persistent pool coordinator.
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.
PoolConfigError
Invalid static pool topology.
PoolError
Typed rejection of an event that cannot apply to the current pool state.
PoolInterruption
Why an accepted assignment ended without a worker completion.
PoolMessage
Messages accepted by a pool coordinator.
PoolRejection
Why a submitted job was not accepted by the pool.
PoolResponse
Complete response protocol for one submitted job.
ProxyCommand
Commands accepted by a stable proxy.
ProxyEvent
ReceiveTimeoutError
A controlled receive-timeout failure.
ReplacementResolution
Consumer-facing resolution of one explicitly designated replacement.
RestartDenial
Why an otherwise eligible replacement set was denied.
RestartPolicy
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
WorkerPhase
Public, payload-free view of one stable worker slot.
WorkerRetirement
Why a stable worker slot is no longer eligible for dispatch.

Traits§

Address
A pure actor-address namespace.
AffinitySelector
Pure, statically dispatched policy for a previously unseen affinity key.
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§

delegate_transition
Fold one event through an inner behavior owned by a semantic wrapper.
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
KeyedPoolEvent
Concrete event sum for a KeyedWorkerPool.
LinkReaction
PoolActions
Complete action type returned by a WorkerPool transition.
PoolEvent
The pool’s concrete event sum, including existing supervision facts.
PoolSends
Pool effects keep responses and assignments in named, independently appendable lanes within the supervised behavior send product.
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

Attribute Macros§

behavior
Generate Behavior wiring for an inherent impl with exact &mut self methods. Invalid receivers are rejected at compile time.