Expand description
Akka-style actor library for Rust, built on tokio.
Multiple actor types share a single ActorSystem; addresses route
messages with compile-time message-type checks (send::<T> only accepts
T::Message). Each actor runs on its own task with a bounded or
unbounded mailbox, an ErrorHandling policy, and standard lifecycle
hooks (pre_start, pre_restart, post_stop, post_restart).
The optional multi-node feature extends the same API across processes
via a xanq broker — see the
inter_node module and the project wiki for setup details.
See the project wiki for the full guide.
Re-exports§
pub use types::JobController;pub use types::JobSpec;pub use types::Message;pub use types::RunJobResult;pub use actor::*;pub use actor_system::*;
Modules§
- actor
- actor_
system - channel
- Thin wrapper over
tokio::sync::mpscthat hides the bounded / unbounded distinction behind a single API. - prelude
- Convenience re-exports for typical actor application code.
- types
Enums§
- Actor
Error - All errors surfaced by the actor system.
- Blocking
- Choice of tokio task primitive used to host the actor’s receive loop.
- Error
Handling - Policy applied when an actor’s
handlereturnsErr. - JobStatus
- Snapshot status for a running job (returned only via
JobController’s internal channels — currently exposed for completeness; the public API usesabort_job/stop_job/resume_jobdirectly). - Life
Cycle - Lifecycle state of a registered actor as tracked by
actor_system_loop.
Traits§
- Maybe
Codec - Bound on
Actor::Message/Actor::Result.