Expand description
The actor subsystem.
Everything user-visible about actors lives here: Actor, ActorRef,
ActorSystem, Props, Context, plus paths/addresses and the
internal ActorCell machinery.
Modules§
- scheduler
- Scheduler — timers backing
schedule_once/schedule_at_fixed_rate.
Structs§
- Actor
Cell - Marker used only for public type references.
- Actor
Path - Actor
Ref - Typed handle to an actor.
- Actor
System - Public handle to the actor system.
- Address
- Bounded
Stash - Bounded stash with a configurable overflow policy.
- Boxed
Props - Type-erased props — used when an actor needs to hold props of an
unknown
A(e.g. remote deployment, routers). - Context
- Passed to every
Actor::handlecall. - Coordinated
Shutdown - Deploy
- Extensions
- Fsm
- Built FSM. Drive it by
handle(msg)per. - FsmBuilder
- Builder for a closure-driven FSM.
- FsmTransition
- Inbox
- A one-shot-style receive handle useful in tests and top-level
maincode. - Local
Actor RefProvider - Message
Envelope - Envelope that carries a user message plus a typed
Sender. - Path
Element - Phase
Config - Per-phase timeout — if any hook exceeds this duration the phase
is abandoned and (if
recover) the next phase begins.phase.timeoutandrecover. - Props
- Typed props. The factory produces fresh
Ainstances on initial start and on restart. - Running
- Marker for the
Runninglifecycle phase. - Serialized
Message - A serialized user message destined for a remote actor.
- Starting
- Marker for the
Startinglifecycle phase. - Stopping
- Marker for the
Stoppinglifecycle phase. - Typed
Context - Phase-typed view over a
Context. The phase parameter is a phantom witness; only methods valid in that phase are exposed. - Untyped
Actor Ref - Untyped ref used where the message type is not statically known (e.g. death-watch notifications across actor types, event stream).
Enums§
- Actor
System Error - AskError
- FsmStop
Reason - Reason an FSM stopped.
- Lifecycle
Phase - Lifecycle phase exposed via
Context::phase. Phase 1.C ofdocs/full-port-plan.md— runtime precursor to the phantom-typedContext<A, Phase>(kept additive so it doesn’t break existing signatures). Stage-only APIs assert against this in debug builds. - Phase
- Phases modeled on defaults.
- Remote
System Msg - System-level controls that travel across the wire.
- Scope
- Sender
- Typed identity of a message’s sender.
- Stash
Overflow - What to do when the stash is full and a new message arrives.
- Stash
Result - Result of
BoundedStash::stash. - System
Msg - Messages on the actor’s system channel.
Traits§
- Actor
- The user-facing
Actortrait. - Actor
RefProvider - Abstract over which backing runtime provides an actor ref:
local, remote, or cluster. Default is
Local. - Dead
Letter Observer - Implementors are notified whenever a
tellfails because the target actor has stopped. Called on the caller’s thread, so implementers should be cheap. - Extension
- Marker trait for types stored in
Extensions. - Extension
Id - Identifier trait mirroring.
- Finite
State Machine - Simple trait-based FSM. Actors implementing this trait are driven by
ctx.become(...)inside their cell. - Phase
Marker - Phase markers for
TypedContext. Each marker type implementsPhaseMarkerwith a constLifecyclePhasediscriminant; thePhasedContextview inspects this at runtime to gate phase-only APIs. - Remote
Provider - Pluggable resolver: given a fully-qualified
ActorPath, return a remote handle that can deliver to it. Installed on theActorSystembyatomr-remote::RemoteActorRefProvider::install. - Remote
Ref - A reference to an actor on a different
ActorSystem. - Spawn
Observer - Implementors are notified whenever actors are spawned or stopped. Methods are called on the actor’s task, so they should be cheap and non-blocking.
- Stash
- Marker — any actor may opt in to document stash usage.
Stash storage itself is provided unconditionally by
Context.