1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//! # Absinthe
//!
//! Absinthe is a library that allows you to create actors in Rust, and communicate with them using async messages.
//! It provides Actor Model primitives, and a super-macro to easily create actors.
//! Just write your Rust code, and Absinthe will handle the rest.
//!
//! ## Features
//!
//! - **Actor Model** - Absinthe provides an Actor trait, and a super-macro to easily create actors.
//! - **Async Messaging** - Absinthe provides a Courier trait, and macros to easily send messages to actors.
//! - **Async Tasks** - Absinthe provides a spawn function to spawn actors as async tasks.
//! - **Async Channels** - Absinthe uses async channels to communicate with actors.
//! - **Actor Functions** - actor! macro can be used to 'actorize' functions, implementing the Actor trait and spawning constructors.
//! - **Actor Structs** - actor! macro can be used to 'actorize' structs, implementing the Actor trait and message routing.
//!
//! ## Example
//! ```rust
//! use absinthe::prelude::*;
//!
//! actor! {
//! async fn add(a: u32, b: u32) -> u32 {
//! a + b
//! }
//! }
//!
//! #[tokio::main]
//! async fn main() {
//! let adder = add();
//! assert_eq!(send!(adder, 1, 2).await, 3);
//! }
//! ```
//!
/// Only used for Absinthe's own development.
/// Absinthe prelude, providing a good starter pack to start writing actors.
/// Actor traits & primitives.
/// Message traits & primitives.
pub use ;
pub use crateCourier;
/// Provides the actor! macro, which 'actorizes' functions & structs.
/// Also provides messaging macros, such as send! and notify!
pub use *;