pub struct Executor { /* private fields */ }Expand description
5-phase plugin execution engine.
Dispatches hooks through the phase pipeline:
SEQUENTIAL → TRANSFORM → AUDIT → CONCURRENT → FIRE_AND_FORGETThe executor is stateless — all state comes from the arguments. One executor instance can serve multiple concurrent hook invocations.
Implementations§
Source§impl Executor
impl Executor
Sourcepub fn new(config: ExecutorConfig) -> Self
pub fn new(config: ExecutorConfig) -> Self
Create a new executor with the given configuration.
Sourcepub async fn execute(
&self,
entries: &[HookEntry],
payload: Box<dyn PluginPayload>,
extensions: Extensions,
context_table: Option<PluginContextTable>,
task_tracker: &TaskTracker,
) -> (PipelineResult, BackgroundTasks)
pub async fn execute( &self, entries: &[HookEntry], payload: Box<dyn PluginPayload>, extensions: Extensions, context_table: Option<PluginContextTable>, task_tracker: &TaskTracker, ) -> (PipelineResult, BackgroundTasks)
Execute a hook invocation through the 5-phase pipeline.
§Arguments
entries— HookEntries for this hook, sorted by priority.payload— The typed payload (type-erased as Box). extensions— The full extensions (filtered per plugin before dispatch).context_table— Optional context table from a previous hook invocation. IfNone, fresh contexts are created for each plugin.
§Returns
A tuple of:
PipelineResult— immutable policy result with payload, extensions, violation, and context table.BackgroundTasks— handles to fire-and-forget tasks. Callwait_for_background_tasks()to await them, or drop to let them complete in the background.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Executor
impl RefUnwindSafe for Executor
impl Send for Executor
impl Sync for Executor
impl Unpin for Executor
impl UnsafeUnpin for Executor
impl UnwindSafe for Executor
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