pub struct CancellableContainerShell {
pub inner: ContainerShell,
pub cancel: Arc<CancelHandle>,
}Expand description
A ContainerShell whose running command can be stopped via a CancelHandle.
Fields§
§inner: ContainerShell§cancel: Arc<CancelHandle>Trait Implementations§
Source§impl Clone for CancellableContainerShell
impl Clone for CancellableContainerShell
Source§impl Debug for CancellableContainerShell
impl Debug for CancellableContainerShell
Source§impl Shell for CancellableContainerShell
impl Shell for CancellableContainerShell
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 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.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.
fn exec_host( &self, command: &str, cwd: &Path, timeout: Duration, ) -> Result<Output, String>
Auto Trait Implementations§
impl Forget for CancellableContainerShell
impl Freeze for CancellableContainerShellwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const ArcInner<CancelHandle> is !null: Freeze,
PhantomData<ArcInner<CancelHandle>>: Freeze,
impl Move for CancellableContainerShell
impl RefUnwindSafe for CancellableContainerShell
impl Send for CancellableContainerShell
impl Sync for CancellableContainerShell
impl Unpin for CancellableContainerShell
impl UnsafeUnpin for CancellableContainerShellwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<CancelHandle> is !null: UnsafeUnpin,
PhantomData<ArcInner<CancelHandle>>: UnsafeUnpin,
impl UnwindSafe for CancellableContainerShell
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