pub struct LocalShell {
pub profile: Option<Profile>,
pub tmpdir: Option<PathBuf>,
}Expand description
Commands run on this machine, in the workspace directory.
Fields§
§profile: Option<Profile>§tmpdir: Option<PathBuf>Implementations§
Source§impl LocalShell
impl LocalShell
Sourcepub fn sandboxed(profile: impl Into<Profile>) -> Self
pub fn sandboxed(profile: impl Into<Profile>) -> Self
Creates a local shell sandboxed with the given profile.
Sourcepub fn conversation_sandboxed(sandbox: ConversationSandbox) -> Self
pub fn conversation_sandboxed(sandbox: ConversationSandbox) -> Self
Creates a local shell sandboxed with a conversation sandbox profile and optional private TMPDIR.
Sourcepub fn with_tmpdir(self, tmpdir: Option<PathBuf>) -> Self
pub fn with_tmpdir(self, tmpdir: Option<PathBuf>) -> Self
Overrides TMPDIR for commands executed by this shell when tmpdir is Some.
Trait Implementations§
Source§impl Clone for LocalShell
impl Clone for LocalShell
Source§impl Debug for LocalShell
impl Debug for LocalShell
Source§impl Default for LocalShell
impl Default for LocalShell
impl Eq for LocalShell
Source§impl PartialEq for LocalShell
impl PartialEq for LocalShell
Source§impl Shell for LocalShell
impl Shell for LocalShell
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>
impl StructuralPartialEq for LocalShell
Auto Trait Implementations§
impl Forget for LocalShell
impl Freeze for LocalShell
impl Move for LocalShell
impl RefUnwindSafe for LocalShell
impl Send for LocalShell
impl Sync for LocalShell
impl Unpin for LocalShell
impl UnsafeUnpin for LocalShell
impl UnwindSafe for LocalShell
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.