appcui 0.4.8

A feature-rich and cross-platform TUI/CUI framework for Rust, enabling modern terminal-based applications on Windows, Linux, and macOS. Includes built-in UI components like buttons, menus, list views, tree views, checkboxes, and more. Perfect for building fast and interactive CLI tools and text-based interfaces.
Documentation
use super::command_parser::{CommandParser, ParserError};

pub(super) struct CheckClipboardTextCommand {
    text: String,
}

impl CheckClipboardTextCommand {
    pub(super) fn new(parser: &CommandParser) -> Result<Self, ParserError> {
        if parser.get_params_count() != 1 {
            return Err(ParserError::new("CheckClipboardText command must have one parameter !"));
        }

        Ok(Self {
            text: parser.get_string(0).unwrap(),
        })
    }
    pub(super) fn get_text(&self) -> &str {
        &self.text
    }
}