pub struct SessionRpcShell<'a> { /* private fields */ }Expand description
session.shell.* RPCs.
Implementations§
Source§impl<'a> SessionRpcShell<'a>
impl<'a> SessionRpcShell<'a>
Sourcepub async fn exec(
&self,
params: ShellExecRequest,
) -> Result<ShellExecResult, Error>
pub async fn exec( &self, params: ShellExecRequest, ) -> Result<ShellExecResult, Error>
Starts a shell command and streams output through session notifications.
Wire method: session.shell.exec.
§Parameters
params- Shell command to run, with optional working directory and timeout in milliseconds.
§Returns
Identifier of the spawned process, used to correlate streamed output and exit notifications.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn kill(
&self,
params: ShellKillRequest,
) -> Result<ShellKillResult, Error>
pub async fn kill( &self, params: ShellKillRequest, ) -> Result<ShellKillResult, Error>
Sends a signal to a shell process previously started via “shell.exec”.
Wire method: session.shell.kill.
§Parameters
params- Identifier of a process previously returned by “shell.exec” and the signal to send.
§Returns
Indicates whether the signal was delivered; false if the process was unknown or already exited.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Trait Implementations§
Source§impl<'a> Clone for SessionRpcShell<'a>
impl<'a> Clone for SessionRpcShell<'a>
Source§fn clone(&self) -> SessionRpcShell<'a>
fn clone(&self) -> SessionRpcShell<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more