Expand description
Core actor traits and types (Actor, ActorRef, Handler, etc.).
Structs§
- Actor
Context - Context passed to actor lifecycle hooks and handlers.
- Actor
Error - An error originating from within an actor’s handler or lifecycle hook.
- AskReply
- A future that resolves to the reply from an
ask()call. - Spawn
Config - Configuration for spawning an actor.
Traits§
- Actor
- The core actor trait. Implemented by the user’s actor struct.
State lives in
self. Lifecycle hooks have default no-ops. - Actor
Ref - A reference to a running actor of type
A. - Expand
Handler - Implemented by actors that handle expand (server-streaming) requests.
The handler receives the request and a
StreamSenderto push items into. When this method returns, the stream closes on the caller side. - Handler
- Implemented by an actor for each message type it can handle. One impl per (Actor, Message) pair. Sequential execution guaranteed.
- Reduce
Handler - Implemented by actors that handle reduce (client-streaming) requests.
- Transform
Handler - Implemented by actors that handle transform (N→M) requests.
Functions§
- cancel_
after - Create a
CancellationTokenthat automatically cancels after the given duration.