pub struct HookCommand {
pub prefix: Prefix,
pub command: String,
pub glob: Option<String>,
}Expand description
A single command parsed from a .githooks/<hook>.hooks file.
Each non-blank, non-comment line in a hooks file produces one
HookCommand. The line format is:
[prefix]command [arguments] [glob]Fields§
§prefix: PrefixThe execution mode prefix (!, ?, or none).
command: StringThe command text (executable and arguments, without prefix or glob).
glob: Option<String>Optional trailing glob pattern that restricts the command to matching staged or tracked files.
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 PartialEq for HookCommand
impl PartialEq for HookCommand
impl Eq for HookCommand
impl StructuralPartialEq for HookCommand
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