Skip to main content

hm_plugin_sdk/
subcommand.rs

1use hm_plugin_protocol::{ExitInfo, PluginError};
2
3pub use hm_plugin_protocol::SubcommandInput;
4
5pub trait SubcommandPlugin {
6    /// Run the subcommand.
7    ///
8    /// # Errors
9    /// Returns a [`PluginError`] describing the failure. The host
10    /// renders the error and exits the process with code 1.
11    fn run(&self, input: SubcommandInput) -> Result<ExitInfo, PluginError>;
12}