Expand description
§Acton Reactive
This crate provides the foundational components for the Acton asynchronous actor system, built on top of Tokio. It establishes a robust, message-passing framework with clear separation of concerns for actor state, runtime management, communication, and lifecycle.
§Key Concepts
- Actors (
ManagedActor): Core computational units wrapping user-defined state and logic, managed by the runtime. - Handles (
ActorHandle): External references for interacting with actors (sending messages, stopping, supervising). - Messaging: Asynchronous communication via Tokio MPSC channels, using
messages implementing the
ActonMessagetrait. - Broker (
Broker): Central publish-subscribe mechanism for topic-based message distribution. - Lifecycle & Supervision: Type-state pattern (
Idle,Started) for actors, lifecycle hooks, and hierarchical supervision. - Runtime (
ActorRuntime): Manages the overall system, including actor creation and shutdown. - Traits: Core interfaces (
ActorHandleInterface,Broker,Subscriber, etc.) define the framework’s capabilities.
§Quick Start
ⓘ
use acton_reactive::prelude::*;
#[acton_message]
struct MyMessage {
content: String,
}Modules§
- prelude
- A prelude module for conveniently importing the most commonly used items.