You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to extend the enum module that contains states and add an additional function to execute transitions using the message enum, instead of executing transition by using message specific function.
This function would be similar to the execute function in the crate macro_machine or the handle_event function in macro_machines.
For the example provided in the doc, in the module Traffic, this new function would be something like:
fnexecute(t:&Traffic,m:&TrafficMessages) -> Traffic{match m {TrafficMessages::Advance(advance) => t.on_advance(advance),TrafficMessages::PassCar(pass_car) => t.on_pass_car(pass_car),}}
The text was updated successfully, but these errors were encountered:
It would be nice to extend the enum module that contains states and add an additional function to execute transitions using the message enum, instead of executing transition by using message specific function.
This function would be similar to the
execute
function in the crate macro_machine or thehandle_event
function in macro_machines.For the example provided in the doc, in the module Traffic, this new function would be something like:
The text was updated successfully, but these errors were encountered: