rush_sync_server/commands/clear/
command.rs

1// =====================================================
2// FILE: commands/clear/clear.rs - TRAIT IMPL
3// =====================================================
4
5use crate::commands::command::Command;
6use crate::core::prelude::*;
7
8#[derive(Debug)]
9pub struct ClearCommand;
10
11impl Command for ClearCommand {
12    fn name(&self) -> &'static str {
13        "clear"
14    }
15
16    fn description(&self) -> &'static str {
17        "Clear the screen"
18    }
19
20    fn matches(&self, command: &str) -> bool {
21        crate::matches_exact!(command, "clear" | "cls")
22    }
23
24    fn execute_sync(&self, _args: &[&str]) -> Result<String> {
25        Ok("__CLEAR__".to_string())
26    }
27
28    fn priority(&self) -> u8 {
29        80 // Sehr hohe Priorität für Clear
30    }
31}