sprite-core 0.1.5

Sprite Engine — a fault-tolerant actor runtime for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#[derive(Clone, Copy, Debug)]
pub enum Strategy {
    Restart,
    Stop,
    Escalate,
}

pub struct Supervisor {
    strategy: Strategy,
}

impl Supervisor {
    pub fn new(strategy: Strategy) -> Self {
        Self { strategy }
    }
    pub fn strategy(&self) -> Strategy { self.strategy }
}