pub trait ContextHook: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn definition_fingerprint(&self) -> String;
fn apply<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
context: &'life1 ExtensionContext,
event: &'life2 ContextEvent,
frame: &'life3 ContextFrame,
) -> Pin<Box<dyn Future<Output = Result<ContextPatch, ExtensionError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
}Required Methods§
fn name(&self) -> &str
Sourcefn definition_fingerprint(&self) -> String
fn definition_fingerprint(&self) -> String
Stable authoring fingerprint for the Hook implementation/configuration.
The Definition builder incorporates this value into its immutable
digest. Change it whenever Hook behavior or embedded static resources
change. Per-execution dynamic resource content still carries its own
ContextResource.digest at runtime.
fn apply<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
context: &'life1 ExtensionContext,
event: &'life2 ContextEvent,
frame: &'life3 ContextFrame,
) -> Pin<Box<dyn Future<Output = Result<ContextPatch, ExtensionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".