inquire/prompts/custom_type/
action.rs1use crate::{ui::Key, InnerAction, InputAction};
2
3use super::config::CustomTypeConfig;
4
5#[derive(Copy, Clone, Debug, PartialEq, Eq)]
7pub enum CustomTypePromptAction {
8 ValueInput(InputAction),
10}
11
12impl InnerAction for CustomTypePromptAction {
13 type Config = CustomTypeConfig;
14
15 fn from_key(key: Key, _config: &CustomTypeConfig) -> Option<Self> {
16 let action = match InputAction::from_key(key, &()) {
17 Some(action) => Self::ValueInput(action),
18 None => return None,
19 };
20
21 Some(action)
22 }
23}