pub struct DefaultHookEngine { /* private fields */ }Expand description
Default hook engine: serial dispatch following the pipeline semantics.
- Uses
ArcSwapto hold aHandlerTable;Self::reloadenables full hot-swap fireinternally filters by matcher → serial await, each handler sees the event after all prior patches have been applied- Timeout, panic, or error in a single handler is downgraded per the degradation table
Implementations§
Source§impl DefaultHookEngine
impl DefaultHookEngine
pub fn new() -> Self
Sourcepub fn reload(&self, table: HandlerTable)
pub fn reload(&self, table: HandlerTable)
Atomically replace the entire handler table with a new one; used for runtime hot-reloading.
The old table is automatically reclaimed by Arc once all in-flight
fire/observe calls finish.
Trait Implementations§
Source§impl Default for DefaultHookEngine
impl Default for DefaultHookEngine
Source§impl HookEngine for DefaultHookEngine
impl HookEngine for DefaultHookEngine
Source§fn dispatch<'a>(
&'a self,
step: &'a mut dyn HookStep,
ctx: HookCtx<'a>,
) -> BoxFuture<'a, HookControl>
fn dispatch<'a>( &'a self, step: &'a mut dyn HookStep, ctx: HookCtx<'a>, ) -> BoxFuture<'a, HookControl>
Default implementation returns
step::HookControl::Proceed (no
intervention); NoopHookEngine uses this directly. DefaultHookEngine
overrides it for real dispatch.Auto Trait Implementations§
impl !Freeze for DefaultHookEngine
impl !RefUnwindSafe for DefaultHookEngine
impl !UnwindSafe for DefaultHookEngine
impl Send for DefaultHookEngine
impl Sync for DefaultHookEngine
impl Unpin for DefaultHookEngine
impl UnsafeUnpin for DefaultHookEngine
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