pub struct RunHookOptions<'a> {
pub stdout_to_stderr: bool,
pub path_to_stdin: Option<&'a Path>,
pub stdin_data: Option<&'a [u8]>,
pub env_vars: &'a [(&'a str, &'a str)],
pub cwd: Option<&'a Path>,
pub commit_env: Option<&'a CommitHookEnv<'a>>,
}Expand description
Options for run_hook_opts.
Fields§
§stdout_to_stderr: boolWhen true, hook stdout is merged to stderr (Git default except pre-push).
path_to_stdin: Option<&'a Path>File path to open and pipe to each hook’s stdin (reopened per hook).
stdin_data: Option<&'a [u8]>In-memory stdin (used when path_to_stdin is None).
env_vars: &'a [(&'a str, &'a str)]Extra environment variables for each hook subprocess.
cwd: Option<&'a Path>Override the hook process working directory.
commit_env: Option<&'a CommitHookEnv<'a>>Commit-style env (GIT_INDEX_FILE, GIT_PREFIX, author exports, …) merged after env_vars.
Trait Implementations§
Source§impl<'a> Clone for RunHookOptions<'a>
impl<'a> Clone for RunHookOptions<'a>
Source§fn clone(&self) -> RunHookOptions<'a>
fn clone(&self) -> RunHookOptions<'a>
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<'a> Debug for RunHookOptions<'a>
impl<'a> Debug for RunHookOptions<'a>
Source§impl<'a> Default for RunHookOptions<'a>
impl<'a> Default for RunHookOptions<'a>
Source§fn default() -> RunHookOptions<'a>
fn default() -> RunHookOptions<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for RunHookOptions<'a>
impl<'a> RefUnwindSafe for RunHookOptions<'a>
impl<'a> Send for RunHookOptions<'a>
impl<'a> Sync for RunHookOptions<'a>
impl<'a> Unpin for RunHookOptions<'a>
impl<'a> UnsafeUnpin for RunHookOptions<'a>
impl<'a> UnwindSafe for RunHookOptions<'a>
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