minactor 0.3.0

Minimal actor framework for Rust with tokio.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::future::Future;
use std::pin::Pin;

/// The Control enum is used by an [Actor] to pass instructions the actor executor.
pub enum Control {
    /// Processing was completed with no errors and no additional instructions needed.
    Ok,
    /// Initiate Shutdown of the actor. For a description of shutdown, see [Actor].
    Shutdown,
    /// Terminate the actor. For a description of termination, see [Actor].
    Terminate,
    /// Spawn the future as a new task and add to the actor's waitlist.
    SpawnFuture(Pin<Box<dyn Future<Output=()> + Send>>),
}