pub struct ProcessShell {
pub config: ShellConfig,
}Expand description
Production shell: delegates to the free functions in this module.
Fields§
§config: ShellConfigShell execution configuration (e.g. overlay viewport height).
Trait Implementations§
Source§impl Default for ProcessShell
impl Default for ProcessShell
Source§fn default() -> ProcessShell
fn default() -> ProcessShell
Returns the “default value” for a type. Read more
Source§impl Shell for ProcessShell
impl Shell for ProcessShell
Source§fn run_command(
&self,
label: &str,
program: &str,
args: &[&str],
output: &mut dyn Output,
mode: OutputMode,
) -> Result<CommandResult, ShellError>
fn run_command( &self, label: &str, program: &str, args: &[&str], output: &mut dyn Output, mode: OutputMode, ) -> Result<CommandResult, ShellError>
Source§fn shell_exec(
&self,
script: &str,
output: &mut dyn Output,
mode: OutputMode,
) -> Result<CommandResult, ShellError>
fn shell_exec( &self, script: &str, output: &mut dyn Output, mode: OutputMode, ) -> Result<CommandResult, ShellError>
Run an arbitrary shell script string (passed to
bash -c / powershell -Command).Source§fn command_exists(&self, program: &str) -> bool
fn command_exists(&self, program: &str) -> bool
Return
true when program can be found on PATH.Source§fn command_output(
&self,
program: &str,
args: &[&str],
) -> Result<String, ShellError>
fn command_output( &self, program: &str, args: &[&str], ) -> Result<String, ShellError>
Run
program args and return its captured stdout as a trimmed String.Source§fn exec_capture(
&self,
cmd: &str,
_output: &mut dyn Output,
_mode: OutputMode,
) -> Result<CommandResult, ShellError>
fn exec_capture( &self, cmd: &str, _output: &mut dyn Output, _mode: OutputMode, ) -> Result<CommandResult, ShellError>
Run a shell command, capturing stdout/stderr silently without display.
In dry-run mode (
DryRunShell), logs the command and returns success without executing.Source§fn exec_interactive(
&self,
cmd: &str,
_output: &mut dyn Output,
_mode: OutputMode,
) -> Result<(), ShellError>
fn exec_interactive( &self, cmd: &str, _output: &mut dyn Output, _mode: OutputMode, ) -> Result<(), ShellError>
Run a shell command with inherited stdio (for interactive flows like
aws sso login).
In dry-run mode (DryRunShell), logs the command and returns success without executing.Auto Trait Implementations§
impl Freeze for ProcessShell
impl RefUnwindSafe for ProcessShell
impl Send for ProcessShell
impl Sync for ProcessShell
impl Unpin for ProcessShell
impl UnsafeUnpin for ProcessShell
impl UnwindSafe for ProcessShell
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