zerolaunch_plugin_api/services/shell/
shell_executor.rs1use super::types::CommandRunMode;
2use crate::host::error::HostApiError;
3use crate::host::open_target::OpenTarget;
4use async_trait::async_trait;
5
6#[async_trait]
9pub trait ShellExecutor: Send + Sync {
10 async fn shell_open(&self, target: &OpenTarget) -> Result<(), HostApiError>;
14
15 async fn shell_open_folder(&self, path: &str) -> Result<(), HostApiError>;
19
20 async fn shell_execute_elevation(&self, path: &str) -> Result<(), HostApiError>;
24
25 async fn shell_execute_command(
29 &self,
30 command: &str,
31 mode: CommandRunMode,
32 ) -> Result<(), HostApiError>;
33}