repokit 5.0.3

A knowledgebase for your repository - wrapped in a CLI
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::collections::HashMap;

use crate::{
    executables::internal_executable_definition::InternalExecutableDefinition,
    internal_commands::help::Help,
};

pub trait InternalExecutable {
    fn run(&self, args: Vec<String>, internals: &HashMap<String, Box<dyn InternalExecutable>>);
    fn get_definition(&self) -> &InternalExecutableDefinition;

    fn help(&self) {
        Help::log_internal_command(self.get_definition());
    }
}