reactive_graph_plugin_api/system/command_manager.rs
1use reactive_graph_command_model::entity::Command;
2use reactive_graph_command_model::error::NoSuchCommand;
3use springtime_di::injectable;
4
5#[injectable]
6pub trait CommandManager: Send + Sync {
7 /// Returns the command with the given name.
8 fn get_command(&self, name: &str) -> Result<Command, NoSuchCommand>;
9
10 /// Returns all commands.
11 fn get_commands(&self) -> Vec<Command>;
12}