pub enum CommandSpec {
Argv {
argv: Vec<String>,
argv_windows: Option<Vec<String>>,
cwd: Option<PathBuf>,
env: BTreeMap<String, String>,
timeout_sec: Option<u64>,
},
Shell {
shell: ShellKind,
command: String,
cwd: Option<PathBuf>,
env: BTreeMap<String, String>,
timeout_sec: Option<u64>,
},
}Expand description
Configuration for a command handler.
See module-level docs.
Conceptually equivalent to defect_config::HookCommandSpec, but lives in the agent
crate. During CLI assembly, the config shape is translated into this form — the agent
crate does not depend on the config crate.
Variants§
Argv
Spawn argv directly, without any shell.
Fields
Shell
Explicit shell. The engine no longer auto-selects sh; an invalid shell kind is
reported as a configuration error.
Trait Implementations§
Source§impl Clone for CommandSpec
impl Clone for CommandSpec
Source§fn clone(&self) -> CommandSpec
fn clone(&self) -> CommandSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CommandSpec
impl Debug for CommandSpec
impl Eq for CommandSpec
Source§impl PartialEq for CommandSpec
impl PartialEq for CommandSpec
Source§fn eq(&self, other: &CommandSpec) -> bool
fn eq(&self, other: &CommandSpec) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CommandSpec
Auto Trait Implementations§
impl Freeze for CommandSpec
impl RefUnwindSafe for CommandSpec
impl Send for CommandSpec
impl Sync for CommandSpec
impl Unpin for CommandSpec
impl UnsafeUnpin for CommandSpec
impl UnwindSafe for CommandSpec
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