pub struct HookExecutor;Expand description
Executes hook commands as subprocesses.
This is an async executor that spawns shell processes, pipes JSON on stdin, and captures output with a timeout.
Implementations§
Source§impl HookExecutor
impl HookExecutor
pub fn new() -> Self
Sourcepub async fn execute(
&self,
command: &HookCommand,
stdin_data: &Value,
) -> HookResult
pub async fn execute( &self, command: &HookCommand, stdin_data: &Value, ) -> HookResult
Execute a hook command.
The command receives stdin_data as JSON on stdin and communicates
results via exit code and optional JSON on stdout.
Trait Implementations§
Source§impl Clone for HookExecutor
impl Clone for HookExecutor
Source§fn clone(&self) -> HookExecutor
fn clone(&self) -> HookExecutor
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 HookExecutor
impl Debug for HookExecutor
Auto Trait Implementations§
impl Freeze for HookExecutor
impl RefUnwindSafe for HookExecutor
impl Send for HookExecutor
impl Sync for HookExecutor
impl Unpin for HookExecutor
impl UnsafeUnpin for HookExecutor
impl UnwindSafe for HookExecutor
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