tree_table/args/
args_tree_open.rs1use crate::statics::{
2 default_emit_event_for_api, default_save_selection_for_api, default_undo_for_api,
3};
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 TreeOpenArgs {
12 pub rows: 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 TreeOpenArgs {
22 fn default() -> Self {
23 TreeOpenArgs {
24 rows: Vec::new(),
25 emit: default_emit_event_for_api(),
26 undo: default_undo_for_api(),
27 save_selection: default_save_selection_for_api(),
28 }
29 }
30}