pub struct DryRunShell {
pub config: ShellConfig,
}Expand description
Dry-run shell: logs what would be executed and returns fake success. Probe methods (command_exists, command_output) delegate to real implementations because they are read-only and safe to call.
Fields§
§config: ShellConfigShell execution configuration (e.g. overlay viewport height).
Trait Implementations§
Source§impl Default for DryRunShell
impl Default for DryRunShell
Source§fn default() -> DryRunShell
fn default() -> DryRunShell
Returns the “default value” for a type. Read more
Source§impl Shell for DryRunShell
impl Shell for DryRunShell
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 DryRunShell
impl RefUnwindSafe for DryRunShell
impl Send for DryRunShell
impl Sync for DryRunShell
impl Unpin for DryRunShell
impl UnsafeUnpin for DryRunShell
impl UnwindSafe for DryRunShell
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