pub struct HookStack { /* private fields */ }Expand description
An ordered stack of hooks.
Implementations§
Source§impl HookStack
impl HookStack
Sourcepub fn dispatch(
&self,
event: &AgentEvent,
ctx: &dyn HookContext,
) -> Vec<EventActions>
pub fn dispatch( &self, event: &AgentEvent, ctx: &dyn HookContext, ) -> Vec<EventActions>
Dispatches an event to all hooks, collecting their actions.
Hook errors are isolated: a failing hook logs a warning and is skipped, never breaking the run loop.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for HookStack
impl !UnwindSafe for HookStack
impl Freeze for HookStack
impl Send for HookStack
impl Sync for HookStack
impl Unpin for HookStack
impl UnsafeUnpin for HookStack
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