pub trait ShellPort: Send + Sync {
// Required methods
fn spawn(
&self,
workstream_id: &WorkstreamId,
working_dir: &Path,
command: Option<&str>,
id_prefix: Option<&str>,
env: Option<&HashMap<String, String>>,
) -> Result<ShellId, ShellError>;
fn write_stdin(&self, id: &ShellId, data: &[u8]) -> Result<(), ShellError>;
fn read_output(&self, id: &ShellId) -> Result<ShellOutput, ShellError>;
fn resize(
&self,
id: &ShellId,
rows: u16,
cols: u16,
) -> Result<(), ShellError>;
fn kill(&self, id: &ShellId) -> Result<(), ShellError>;
fn is_alive(&self, id: &ShellId) -> Result<bool, ShellError>;
}Expand description
Port trait for shell management. Implementations live in vex/app.