Skip to main content

serenade_console/commands/
about.rs

1//! `serenade:about` - plain framework banner.
2
3use crate::{Command, ConsoleError, Input};
4
5/// Prints Serenade version, environment, and debug flag.
6#[derive(Clone, Copy, Debug, Default)]
7pub struct AboutCommand;
8
9impl Command for AboutCommand {
10    fn name(&self) -> &'static str {
11        "serenade:about"
12    }
13
14    fn description(&self) -> &'static str {
15        "Display Serenade version and runtime environment"
16    }
17
18    fn execute(&self, input: &Input) -> Result<(), ConsoleError> {
19        println!("Serenade Console");
20        println!("  kernel:      {}", serenade_kernel::version());
21        println!("  console:     {}", env!("CARGO_PKG_VERSION"));
22        println!("  environment: {}", input.environment());
23        println!("  debug:       {}", input.debug());
24        Ok(())
25    }
26}