macro_rules! action_change_and_sends {
($state:expr, $emit1:expr, $emit2:expr $(,)?) => { ... };
($state:expr, $emit1:expr, $emit2:expr, $emit3:expr $(,)?) => { ... };
($state:expr, $emit1:expr, $emit2:expr, $emit3:expr, $emit4:expr $(,)?) => { ... };
($state:expr, $emit1:expr, $emit2:expr, $emit3:expr, $emit4:expr, $emit5:expr $(,)?) => { ... };
($state:expr, $emit1:expr, $emit2:expr, $emit3:expr, $emit4:expr, $emit5:expr, $emit6:expr $(,)?) => { ... };
($_:tt) => { ... };
}
A macro for an action changing the state and sending several messages.
Usage is action_sends!(state, emit, emit, ...)
to create an action that changes the agent’s
state and emits multiple messages.