Expand description
Tokio-based actor framework.
Stagecraft provides four actor traits and a Context type that orchestrates
their lifecycle. Actors communicate through typed message channels via Handle.
§Actor Variants
| Trait | Send required | Event stream |
|---|---|---|
Actor | yes | no |
StreamActor | yes | yes |
LocalActor | no | no |
LocalStreamActor | no | yes |
Use Actor for the common case. Use LocalActor when actor state is !Send
(e.g. it holds a libinput context). Append Stream to also react to a Stream.
Structs§
- Actor
Dead - Error returned when a message cannot be delivered because the actor is no longer running.
- Context
- Lifecycle context passed to actor methods.
- Handle
- A cloneable handle to a running actor.
Traits§
- Actor
- An asynchronous,
Send-safe actor. - HasMailbox
- Base trait for all actors.
- Local
Actor - An actor that runs on a dedicated OS thread with a
LocalSet. - Local
Stream Actor - A
LocalActorthat also processes events from aStream. - Stream
Actor - An
Actorthat also processes events from aStream.