macro_rules! stack_isolate {
($stack:expr, $data:expr, $($state:expr),+) => { ... };
}Expand description
Alternative to stack.isolate(&mut data, Box::new(FooState {})).
Use stack_isolate!(stack, data, FooState {}, BarState {}, ...)
OBS.: Don’t use &mut data as a parameter, but simply data.
- Accepts multiple
States. In which case it will pop everything from the stack and then push the provided states.