nestrs-cli-rs 0.1.0

Rust port of the Nest CLI for the nestrs organization.
Documentation
//! Upstream source: `../nest-cli/commands/info.command.ts`.

use crate::actions::ActionKind;

use super::abstract_command::AbstractCommand;
use super::{CommandName, CommandSpec, command_spec};

/// Typed wrapper for upstream `InfoCommand`.
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
pub struct InfoCommand;

impl InfoCommand {
    pub const fn new() -> Self {
        Self
    }

    pub fn spec(&self) -> &'static CommandSpec {
        command_spec(CommandName::Info).expect("info command spec")
    }

    pub const fn action_kind(&self) -> ActionKind {
        ActionKind::Info
    }
}

impl AbstractCommand for InfoCommand {
    fn command_name(&self) -> CommandName {
        CommandName::Info
    }
}