tree_table/args/
args_del.rs1use crate::statics::default_emit_event_for_api;
2use crate::statics::default_save_selection_for_api;
3use crate::statics::default_undo_for_api;
4use alloc::string::String;
5use alloc::vec::Vec;
6
7#[cfg_attr(feature = "tsify", derive(tsify::Tsify))]
8#[cfg_attr(feature = "tsify", tsify(from_wasm_abi))]
9#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
10#[derive(Debug, Clone, PartialEq)]
11pub struct DelArgs {
12 pub items: Option<Vec<String>>,
13 #[cfg_attr(feature = "serde", serde(default = "default_emit_event_for_api"))]
14 pub emit: bool,
15 #[cfg_attr(feature = "serde", serde(default = "default_undo_for_api"))]
16 pub undo: bool,
17 #[cfg_attr(feature = "serde", serde(default = "default_save_selection_for_api"))]
18 pub save_selection: bool,
19}
20
21impl Default for DelArgs {
22 fn default() -> Self {
23 DelArgs {
24 items: None,
25 emit: default_emit_event_for_api(),
26 undo: default_undo_for_api(),
27 save_selection: default_save_selection_for_api(),
28 }
29 }
30}
31
32#[cfg_attr(feature = "tsify", derive(tsify::Tsify))]
33#[cfg_attr(feature = "tsify", tsify(from_wasm_abi))]
34#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
35#[derive(Debug, Clone, PartialEq)]
36pub struct DelPosArgs {
37 pub items: Option<Vec<usize>>,
38 #[cfg_attr(feature = "serde", serde(default = "default_emit_event_for_api"))]
39 pub emit: bool,
40 #[cfg_attr(feature = "serde", serde(default = "default_undo_for_api"))]
41 pub undo: bool,
42 #[cfg_attr(feature = "serde", serde(default = "default_save_selection_for_api"))]
43 pub save_selection: bool,
44}
45
46impl Default for DelPosArgs {
47 fn default() -> Self {
48 DelPosArgs {
49 items: None,
50 emit: default_emit_event_for_api(),
51 undo: default_undo_for_api(),
52 save_selection: default_save_selection_for_api(),
53 }
54 }
55}