stack_push

Macro stack_push 

Source
macro_rules! stack_push {
    ($stack:expr, $data:expr, $($state:expr),+) => { ... };
}
Expand description

Alternative to stack.push(&mut data, Box::new(FooState {})). Use stack_push!(stack, data, FooState {}, BarState {}, ...)

  • Accepts multiple states. In which case it will push all of the provided. OBS.: Don’t use &mut data as a parameter, but simply data.