-
Jordan Petridis authored
Currently it's required that you take mut self in order to manipulate the internal state machines. This would not allow passing an Arc/Rc to a callback since A/Rc<T> only derefs to &T and not T. The take_mut crate allows the retrieval of ownership if you have a &mut refference and as long you return T again. So Arc<Mutex<Machine> could work with callbacks and embed Nested state machies without copying.