pub struct CommandAction {
pub command: String,
pub args: Vec<String>,
pub timeout_ms: Option<u64>,
pub capture_output: bool,
}Expand description
Command action configuration
Executes a shell command when the hook is triggered. Supports variable substitution
in command arguments using {{variable_name}} syntax.
§Examples
ⓘ
CommandAction {
command: "prettier".to_string(),
args: vec!["--write".to_string(), "{{file_path}}".to_string()],
timeout_ms: Some(5000),
capture_output: true,
}Fields§
§command: StringCommand to execute
args: Vec<String>Command arguments (supports variable substitution)
timeout_ms: Option<u64>Optional timeout in milliseconds
capture_output: boolWhether to capture output
Trait Implementations§
Source§impl Clone for CommandAction
impl Clone for CommandAction
Source§fn clone(&self) -> CommandAction
fn clone(&self) -> CommandAction
Returns a duplicate of the value. Read more
1.0.0 · 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 CommandAction
impl Debug for CommandAction
Source§impl<'de> Deserialize<'de> for CommandAction
impl<'de> Deserialize<'de> for CommandAction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CommandAction
impl RefUnwindSafe for CommandAction
impl Send for CommandAction
impl Sync for CommandAction
impl Unpin for CommandAction
impl UnwindSafe for CommandAction
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