pub struct CancellableLocalShell {
pub inner: LocalShell,
pub cancel: Arc<CancelHandle>,
}Expand description
A [LocalShell] whose running command can be stopped via a CancelHandle.
Fields§
§inner: LocalShell§cancel: Arc<CancelHandle>Trait Implementations§
Source§impl Clone for CancellableLocalShell
impl Clone for CancellableLocalShell
Source§impl Debug for CancellableLocalShell
impl Debug for CancellableLocalShell
Source§impl Shell for CancellableLocalShell
impl Shell for CancellableLocalShell
Source§fn exec(
&self,
command: &str,
cwd: &Path,
timeout: Duration,
) -> Result<Output, String>
fn exec( &self, command: &str, cwd: &Path, timeout: Duration, ) -> Result<Output, String>
Run a command to completion. Blocking by contract – see
tools for why.Source§fn describe(&self) -> String
fn describe(&self) -> String
Human-readable description of where commands land, for the system prompt.
A worker that knows it is inside a container does not go looking for the host.
Source§fn exec_user(
&self,
command: &str,
cwd: &Path,
timeout: Duration,
) -> Result<Output, String>
fn exec_user( &self, command: &str, cwd: &Path, timeout: Duration, ) -> Result<Output, String>
Run a command the model issued. Where the executor keeps a persistent session, its
cd and export carry over to the model’s next command, as in a terminal. The default
is exec: a fresh process in cwd.fn exec_host( &self, command: &str, cwd: &Path, timeout: Duration, ) -> Result<Output, String>
Auto Trait Implementations§
impl Forget for CancellableLocalShell
impl Freeze for CancellableLocalShell
impl Move for CancellableLocalShell
impl RefUnwindSafe for CancellableLocalShell
impl Send for CancellableLocalShell
impl Sync for CancellableLocalShell
impl Unpin for CancellableLocalShell
impl UnsafeUnpin for CancellableLocalShell
impl UnwindSafe for CancellableLocalShell
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more