Closed MartinBroers closed 2 weeks ago
@ryan-summers Thanks for merging !66. I also like the function of a transition callback, so I went straight on it.
In terms of refinement and/or discussion, I am doubting mostly about this right now:
self.context().transition_callback(&in_state, &out_state); self.state = Some(out_state);
Or should it be like this:
self.state = Some(out_state); self.context().transition_callback(&in_state, &out_state);
So, call the transition callback after the internal state has been updated?
I don't think it matters too much since the user will have both the input and output state directly in the method call as opposed to via the context.
@ryan-summers Thanks for merging !66. I also like the function of a transition callback, so I went straight on it.
In terms of refinement and/or discussion, I am doubting mostly about this right now:
Or should it be like this:
So, call the transition callback after the internal state has been updated?