Skip to main content

tree_table/api/
undo.rs

1use crate::args::UndoRedoArgs;
2use crate::{EventData, Table};
3use alloc::rc::Rc;
4use alloc::string::String;
5use core::cell::RefCell;
6
7impl Table {
8    pub fn undo(
9        &mut self,
10        kwargs: Option<UndoRedoArgs>,
11    ) -> Result<Option<Rc<RefCell<EventData>>>, String> {
12        self.cr_undo(kwargs)
13    }
14
15    pub fn redo(
16        &mut self,
17        kwargs: Option<UndoRedoArgs>,
18    ) -> Result<Option<Rc<RefCell<EventData>>>, String> {
19        self.cr_redo(kwargs)
20    }
21
22    pub fn get_next_redo(&self) -> Result<Option<Rc<RefCell<EventData>>>, String> {
23        self.cr_get_next_redo()
24    }
25
26    pub fn get_next_undo(&self) -> Result<Option<Rc<RefCell<EventData>>>, String> {
27        self.cr_get_next_undo()
28    }
29}