tyra 1.0.0

Typed Actor System
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::time::Duration;

#[derive(PartialEq, Debug)]
/// ActorResults that determine how the actor should proceed
pub enum ActorResult {
    /// continue processing messages
    Ok,
    /// lock mailbox, stop after mailbox is empty
    Stop,
    /// restart immediately, continue processing messages afterwards
    Restart,
    /// stop immediately and ignore any remaining messages in the mailbox
    Kill,
    /// pauses message processing for the specified duration
    Sleep(Duration),
}