Skip to main content

ExecHook

Type Alias ExecHook 

Source
pub type ExecHook = Arc<dyn for<'a> Fn(&'a dyn Executor) -> ExecFuture<'a, Result<(), ExecError>> + Send + Sync>;
Expand description

The hook payload the execution layer fixes QueryExtensionsHook parameter to: an async function of &dyn Executor.

A hook receives exactly the executor the caller passed in — so it runs inside the caller’s transaction when there is one — and it receives it as &dyn Executor, not &Transaction, so a hook cannot end a transaction it did not open.

Aliased Type§

pub struct ExecHook { /* private fields */ }