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