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)); }