pub enum HookEntry {
Step {
step: String,
patterns: Vec<String>,
rules: Vec<String>,
},
Simple(String),
}Expand description
A single entry in a hook’s command list.
Can be either a simple shell command string or a structured step with file-pattern matching.
hooks:
commit-msg:
- sr hook commit-msg # simple command
pre-commit:
- step: format # structured step
patterns:
- "*.rs"
rules:
- "rustfmt --check --edition 2024 {files}"Variants§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for HookEntry
impl<'de> Deserialize<'de> for HookEntry
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 HookEntry
impl RefUnwindSafe for HookEntry
impl Send for HookEntry
impl Sync for HookEntry
impl Unpin for HookEntry
impl UnsafeUnpin for HookEntry
impl UnwindSafe for HookEntry
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