nestrs-cli-rs 0.1.0

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

use crate::actions::ActionKind;

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

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

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

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

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

impl AbstractCommand for StartCommand {
    fn command_name(&self) -> CommandName {
        CommandName::Start
    }
}