pub type UndoStackModifier<T> = Rc<dyn Fn(T) -> T>;
Called right before a new entry is pushed to the undo stack.
pub struct UndoStackModifier<T> { /* private fields */ }