Skip to main content

tree_table/args/
args_undo.rs

1use crate::statics::default_emit_event_for_api;
2use alloc::vec::Vec;
3
4#[cfg_attr(feature = "tsify", derive(tsify::Tsify))]
5#[cfg_attr(feature = "tsify", tsify(from_wasm_abi))]
6#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
7#[derive(Debug, Clone, PartialEq)]
8pub struct UndoRedoArgs {
9    #[cfg_attr(feature = "serde", serde(default = "default_emit_event_for_api"))]
10    pub emit: bool,
11    #[cfg_attr(feature = "serde", serde(default))]
12    pub invalid_indices: Vec<u64>,
13}
14
15impl Default for UndoRedoArgs {
16    fn default() -> Self {
17        UndoRedoArgs {
18            emit: default_emit_event_for_api(),
19            invalid_indices: Vec::new(),
20        }
21    }
22}