Skip to main content

Module actor

Module actor 

Source
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§

ActorCell
Marker used only for public type references.
ActorPath
ActorRef
Typed handle to an actor.
ActorSystem
Public handle to the actor system.
Address
BoundedStash
Bounded stash with a configurable overflow policy.
BoxedProps
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::handle call.
CoordinatedShutdown
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 main code.
LocalActorRefProvider
MessageEnvelope
Envelope that carries a user message plus a typed Sender.
PathElement
PhaseConfig
Per-phase timeout — if any hook exceeds this duration the phase is abandoned and (if recover) the next phase begins. phase.timeout and recover.
Props
Typed props. The factory produces fresh A instances on initial start and on restart.
Running
Marker for the Running lifecycle phase.
SerializedMessage
A serialized user message destined for a remote actor.
Starting
Marker for the Starting lifecycle phase.
Stopping
Marker for the Stopping lifecycle phase.
TypedContext
Phase-typed view over a Context. The phase parameter is a phantom witness; only methods valid in that phase are exposed.
UntypedActorRef
Untyped ref used where the message type is not statically known (e.g. death-watch notifications across actor types, event stream).

Enums§

ActorSystemError
AskError
FsmStopReason
Reason an FSM stopped.
LifecyclePhase
Lifecycle phase exposed via Context::phase. Phase 1.C of docs/full-port-plan.md — runtime precursor to the phantom-typed Context<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.
RemoteSystemMsg
System-level controls that travel across the wire.
Scope
Sender
Typed identity of a message’s sender.
StashOverflow
What to do when the stash is full and a new message arrives.
StashResult
Result of BoundedStash::stash.
SystemMsg
Messages on the actor’s system channel.

Traits§

Actor
The user-facing Actor trait.
ActorRefProvider
Abstract over which backing runtime provides an actor ref: local, remote, or cluster. Default is Local.
DeadLetterObserver
Implementors are notified whenever a tell fails 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.
ExtensionId
Identifier trait mirroring.
FiniteStateMachine
Simple trait-based FSM. Actors implementing this trait are driven by ctx.become(...) inside their cell.
PhaseMarker
Phase markers for TypedContext. Each marker type implements PhaseMarker with a const LifecyclePhase discriminant; the PhasedContext view inspects this at runtime to gate phase-only APIs.
RemoteProvider
Pluggable resolver: given a fully-qualified ActorPath, return a remote handle that can deliver to it. Installed on the ActorSystem by atomr-remote::RemoteActorRefProvider::install.
RemoteRef
A reference to an actor on a different ActorSystem.
SpawnObserver
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.