excel_cli/actions/
command.rs1use super::types::{ActionCommand, ActionType};
2
3impl ActionCommand {
4 #[must_use]
6 pub fn get_action_type(&self) -> ActionType {
7 match self {
8 ActionCommand::Cell(action) => match action.action_type {
9 ActionType::Paste => ActionType::Paste,
10 _ => ActionType::Edit, },
12 ActionCommand::Row(_) => ActionType::DeleteRow,
13 ActionCommand::MultiRow(_) => ActionType::DeleteMultiRows,
14 ActionCommand::Column(_) => ActionType::DeleteColumn,
15 ActionCommand::MultiColumn(_) => ActionType::DeleteMultiColumns,
16 ActionCommand::Sheet(_) => ActionType::DeleteSheet,
17 }
18 }
19}