pub struct HookCommand {
pub type: String,
pub command: String,
pub timeout: u32,
}Expand description
A single hook command to execute as a subprocess.
Fields§
§type: StringCommand type — currently always “command”.
command: StringThe shell command to execute.
timeout: u32Timeout in seconds (clamped to 1..=600).
Implementations§
Source§impl HookCommand
impl HookCommand
Sourcepub fn with_timeout(command: impl Into<String>, timeout: u32) -> Self
pub fn with_timeout(command: impl Into<String>, timeout: u32) -> Self
Create a new hook command with a custom timeout.
Sourcepub fn effective_timeout(&self) -> u32
pub fn effective_timeout(&self) -> u32
The effective timeout, clamped to the valid range.
Trait Implementations§
Source§impl Clone for HookCommand
impl Clone for HookCommand
Source§fn clone(&self) -> HookCommand
fn clone(&self) -> HookCommand
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 HookCommand
impl Debug for HookCommand
Source§impl<'de> Deserialize<'de> for HookCommand
impl<'de> Deserialize<'de> for HookCommand
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 HookCommand
impl RefUnwindSafe for HookCommand
impl Send for HookCommand
impl Sync for HookCommand
impl Unpin for HookCommand
impl UnsafeUnpin for HookCommand
impl UnwindSafe for HookCommand
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