may_actor 0.2.3

Simple Actor library based on MAY
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use may_actor::Actor;

fn main() {
    struct HelloActor(u32);
    let a = Actor::new(HelloActor(0));

    a.call(|me| {
        me.0 = 10;
        println!("hello world");
    });
    // the view would wait previous messages process done
    a.with(|me| println!("actor value is {}", me.0));
}