pub trait ErasedHookCallback: Send + Sync {
// Required method
fn call_erased<'life0, 'async_trait>(
&'life0 self,
input: Value,
context: HookContext,
) -> Pin<Box<dyn Future<Output = HookDecision> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Type-erased hook callback. The concrete input type is rebuilt at
dispatch time from input.hook_event_name.
Required Methods§
Sourcefn call_erased<'life0, 'async_trait>(
&'life0 self,
input: Value,
context: HookContext,
) -> Pin<Box<dyn Future<Output = HookDecision> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn call_erased<'life0, 'async_trait>(
&'life0 self,
input: Value,
context: HookContext,
) -> Pin<Box<dyn Future<Output = HookDecision> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Deserialise input into the concrete input type and invoke the
wrapped callback.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".