pub enum PluginInvocation<'a> {
Step {
phase: DispatchPhase,
},
Field {
name: &'a str,
value: &'a Value,
phase: DispatchPhase,
},
}Expand description
Context for one plugin invocation: tells the invoker the intent of the call so it can dispatch to the right CPEX hook contract.
Step is the policy / post_policy case — the invoker (apl-cpex side)
already holds a typed payload reference; APL doesn’t need to pass one.
Field is the pipe-chain case — APL is focused on a specific field
value mid-transform and the plugin may rewrite that value via
PluginOutcome.modified_value.
Both variants carry a DispatchPhase so the invoker can resolve the
right hook entry against the cpex-core hook routing table when the
plugin registered for multiple hooks.
Variants§
Step
Called from a pre_invocation: or post_invocation: step. The plugin operates
on whatever typed payload the invoker was bound to.
Fields
phase: DispatchPhaseField
Called inside an args: / result: pipe chain on one field.
Implementations§
Source§impl<'a> PluginInvocation<'a>
impl<'a> PluginInvocation<'a>
Sourcepub fn phase(&self) -> DispatchPhase
pub fn phase(&self) -> DispatchPhase
Convenience: the dispatch phase carried by this invocation.
Trait Implementations§
Source§impl<'a> Clone for PluginInvocation<'a>
impl<'a> Clone for PluginInvocation<'a>
Source§fn clone(&self) -> PluginInvocation<'a>
fn clone(&self) -> PluginInvocation<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more