Skip to main content

cli/commands/
info_command.rs

1//! Upstream source: `../nest-cli/commands/info.command.ts`.
2
3use crate::actions::ActionKind;
4
5use super::abstract_command::AbstractCommand;
6use super::{CommandName, CommandSpec, command_spec};
7
8/// Typed wrapper for upstream `InfoCommand`.
9#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
10pub struct InfoCommand;
11
12impl InfoCommand {
13    pub const fn new() -> Self {
14        Self
15    }
16
17    pub fn spec(&self) -> &'static CommandSpec {
18        command_spec(CommandName::Info).expect("info command spec")
19    }
20
21    pub const fn action_kind(&self) -> ActionKind {
22        ActionKind::Info
23    }
24}
25
26impl AbstractCommand for InfoCommand {
27    fn command_name(&self) -> CommandName {
28        CommandName::Info
29    }
30}