pub struct ShellCommandHook { /* private fields */ }Expand description
One config-driven lifecycle shell command.
Implementations§
Trait Implementations§
Source§impl AgentHook for ShellCommandHook
impl AgentHook for ShellCommandHook
Source§fn point(&self) -> AgentHookPoint
fn point(&self) -> AgentHookPoint
Which hook point this hook subscribes to.
Source§fn run<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_point: AgentHookPoint,
payload: &'life1 HookPayload,
session: &'life2 Session,
) -> Pin<Box<dyn Future<Output = HookResult> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
ShellCommandHook: 'async_trait,
fn run<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_point: AgentHookPoint,
payload: &'life1 HookPayload,
session: &'life2 Session,
) -> Pin<Box<dyn Future<Output = HookResult> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
ShellCommandHook: 'async_trait,
Execute the hook. Read more
Source§fn matches(&self, payload: &HookPayload) -> bool
fn matches(&self, payload: &HookPayload) -> bool
Whether this hook applies to the point-specific payload. Read more
Source§fn may_suspend(&self) -> bool
fn may_suspend(&self) -> bool
Whether this hook can request a resumable suspension. Unknown native
hooks conservatively can. Hosts may declare a hook non-suspending only
when it never returns
Suspend; violating that declaration aborts the
operation rather than creating a wait. The declaration is frozen at
registration. Allow/Deny/Ask remain independent.Auto Trait Implementations§
impl Freeze for ShellCommandHook
impl RefUnwindSafe for ShellCommandHook
impl Send for ShellCommandHook
impl Sync for ShellCommandHook
impl Unpin for ShellCommandHook
impl UnsafeUnpin for ShellCommandHook
impl UnwindSafe for ShellCommandHook
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