watcher/node/src/watcher/command.rs

29 lines
481 B
Rust

use std::sync::Arc;
use cli_renderer::RenderCommand;
use crate::node::NodeCommand;
#[derive(Debug, Clone)]
pub enum WatcherCommand {
NodeResponse(String),
Node(NodeCommand),
Echo(Vec<String>),
Print(String),
InvalidCommand(String),
Render(RenderCommand),
SetMode(WatcherMode),
Exit,
}
#[derive(Debug, Clone)]
pub enum WatcherMode {
Input,
Select{
content: Arc<Vec<String>>,
title: String,
callback: Box<WatcherCommand>,
index: usize,
},
}