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 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 CancellableLocalShellwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<PathBuf>: Freeze,
*const ArcInner<CancelHandle> is !null: Freeze,
PhantomData<ArcInner<CancelHandle>>: Freeze,
impl Move for CancellableLocalShell
impl RefUnwindSafe for CancellableLocalShell
impl Send for CancellableLocalShell
impl Sync for CancellableLocalShell
impl Unpin for CancellableLocalShell
impl UnsafeUnpin for CancellableLocalShellwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<PathBuf>: UnsafeUnpin,
*const ArcInner<CancelHandle> is !null: UnsafeUnpin,
PhantomData<ArcInner<CancelHandle>>: UnsafeUnpin,
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